jadu / php-style
Jadu PHP coding style configuration for PHP-CS-Fixer
Installs: 82 241
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 24
Forks: 2
Open Issues: 0
Requires
- php: >=7.1
- friendsofphp/php-cs-fixer: ^3.14
This package is auto-updated.
Last update: 2024-11-18 17:02:11 UTC
README
Require the php-style dev dependency:
composer require --dev jadu/php-style
In your project's .php-cs-fixer.dist.php
config file use the Config
class as follows:
<?php
require_once __DIR__ . '/vendor/jadu/php-style/src/Config.php';
use Jadu\Style\Config;
use PhpCsFixer\Finder;
$finder = Finder::create();
$finder->in(__DIR__ . '/src');
$finder->in(__DIR__ . '/tests/unit');
$config = new Config();
$config->setFinder($finder);
return $config;
Now add phpcs to your project's build tasks.
Example CI command:
vendor/bin/php-cs-fixer --dry-run -v fix