Skip to content

Commit 9732cd6

Browse files
committed
docs: update Usage with combined cs:check/cs:fix scripts
1 parent e5d43ab commit 9732cd6

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff 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

8386
Then 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
```

0 commit comments

Comments
 (0)