File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,21 @@ Add composer scripts to your `composer.json`:
7373
7474``` json
7575"scripts" : {
76- "cs:check" : " phpcs -p -s --colors --report-full --report-summary" ,
77- "cs:fix" : " phpcbf -p --colors" ,
78- "cs-fixer:check" : " php-cs-fixer fix --dry-run --diff" ,
79- "cs-fixer:fix" : " php-cs-fixer fix"
76+ "cs" : " @cs:fix" ,
77+ "cs:check" : [" @php-cs-fixer:dry" , " @phpcs" ],
78+ "cs:fix" : [" @php-cs-fixer" , " @phpcbf" ],
79+ "phpcs" : " phpcs -p -s --colors --report-full --report-summary" ,
80+ "phpcbf" : " phpcbf -p --colors" ,
81+ "php-cs-fixer" : " php-cs-fixer fix --no-interaction --ansi --quiet" ,
82+ "php-cs-fixer:dry" : " php-cs-fixer fix --no-interaction --ansi --verbose --dry-run"
8083}
8184```
8285
8386Then run:
8487
8588``` shell
86- composer cs:check # PHP_CodeSniffer: check only
87- composer cs:fix # PHP_CodeSniffer: auto- fix
88- composer cs-fixer:check # PHP-CS-Fixer: check only
89- composer cs-fixer:fix # PHP-CS-Fixer: auto-fix
89+ composer cs:check # run both tools in check mode
90+ composer cs:fix # run both tools in fix mode
91+ composer phpcs # PHP_CodeSniffer only
92+ composer php- cs-fixer # PHP-CS-Fixer only
9093```
You can’t perform that action at this time.
0 commit comments