hill-98/php-cs-fixer-config
Just a PHP CS Fixer rule set
Maintainers
1.1.0
2021-06-29 10:25 UTC
Requires
- php: ^7.0 | ^8.0
- friendsofphp/php-cs-fixer: ^3.0
Requires (Dev)
- phpunit/phpunit: ^9.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT bee67c3f445720c2b78651ca735c314341d78a82
- Zhong Lufan <lufanzhong.woop@gmail.com>
README
👁 Packagist Version
👁 Packagist Downloads
👁 MIT
👁 PHPUnit Test
Based on the PSR12 rule set to expand
Install
composer require hill-98/php-cs-fixer-config --dev
You can also go to the releases of the latest version
Usage
.php-cs-fixer.php:
<?php // Allow Risky rules // const RISKY = true; $finder = PhpCsFixer\Finder::create() ->exclude('somedir') ->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') ->in(__DIR__); // These rules will be merged and set ($rules must be array) $rules = []; // Extended $config ($config must be \PhpCsFixer\ConfigInterface) // $config = new PhpCsFixer\Config(); /** @var \PhpCsFixer\Config $config */ $config = require __DIR__.'/vendor/hill-98/php-cs-fixer-config/main.php'; // Auto set $finder ($finder must be iterable) // $config->setFinder($finder); // Don't repeat SET return $config;
