My PHP CS Fixer rules
| scripts | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .php-cs-fixer.php | ||
| bun.lock | ||
| commitlint.config.js | ||
| composer.json | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| phpstan.neon | ||
| publish.env.example | ||
| README.md | ||
My PHP CS Fixer rules
My custom rulesets for PHP CS Fixer 3.88+.
It's based on PER-CS3 and Nuno Maduro's Essentials package.
Installation
Install through Composer:
composer require --dev rvxlab/php-cs-fixer-rules
This package is also available through Forgejo. Add the following repository, then require the package:
{
"type": "composer",
"url": "https://code.rvx.works/api/packages/RVxLab/composer"
}
In your .php-cs-fixer.php register the rulesets and enable them:
return (new PhpCsFixer\Config())
->registerCustomRuleSets([
new RVxLab\PhpCsFixerRules\RuleSet(),
new RVxLab\PhpCsFixerRules\RuleSetRisky(),
])
->setRiskyAllowed(true)
->setRules([
RVxLab\PhpCsFixerRules\RuleSet::NAME => true,
RVxLab\PhpCsFixerRules\RuleSetRisky::NAME => true,
]);
License
This package is licensed under the MIT License.