PHP-CS-Fixer sweetened with ease 🍒
SugaredRim\PHP-CS-Fixer takes an opinionated view of code style checking with PHP-CS-Fixer, it is preconfigured to get you up and running as quickly as possible.
$ composer require --dev sugared-rim/php-cs-fixer
Instead of running php-cs-fixer
with all its options, just run sugared-rim-php-cs-fixer
- that's it:
{
...
"require-dev": {
"sugared-rim/php-cs-fixer": ...
},
"scripts": {
"lint": "sugared-rim-php-cs-fixer"
}
}
You may overwrite some options by putting it in your composer.json
.
Some of the default settings:
{
...
"scripts": {
"lint": "sugared-rim-php-cs-fixer"
},
"extra": {
"sugared-rim/php-cs-fixer": {
"diff": true,
"dry-run": true,
"cache": true,
"path": {
"in": [
"."
],
"name": [
"*.php",
"*.phtml",
"*.twig",
"*.xml",
"*.yml"
],
"exclude": [
"build",
"bower_components",
"node_modules",
"vendor"
],
"ignoreDotFiles": true,
"ignoreVCS": true
}
}
}
}
MIT © Michael Mayer