mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 13:05:59 +02:00
php-cs-fixer: add page (#8577)
* php-cs-fixer: add page * php-cs-fixer: apply fixes from code review
This commit is contained in:
parent
63cb8b805f
commit
2c1691c48f
1 changed files with 36 additions and 0 deletions
36
pages/common/php-cs-fixer.md
Normal file
36
pages/common/php-cs-fixer.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# PHP-CS-Fixer
|
||||
|
||||
> Automatic coding style fixer for PHP.
|
||||
> More information: <https://github.com/FriendsOfPHP/PHP-CS-Fixer>.
|
||||
|
||||
- Execute code style fixing in the current directory:
|
||||
|
||||
`php-cs-fixer fix`
|
||||
|
||||
- Execute code style fixing for a specific directory:
|
||||
|
||||
`php-cs-fixer fix {{path/to/directory}}`
|
||||
|
||||
- Execute code style linting without applying changes:
|
||||
|
||||
`php-cs-fixer fix --dry-run`
|
||||
|
||||
- Execute code style fixes using specific rules:
|
||||
|
||||
`php-cs-fixer fix --rules={{rules}}`
|
||||
|
||||
- Display the rules that have been applied:
|
||||
|
||||
`php-cs-fixer fix --verbose`
|
||||
|
||||
- Output the results in a different format:
|
||||
|
||||
`php-cs-fixer fix --format={{txt|json|xml|checkstyle|junit|gitlab}}`
|
||||
|
||||
- Display files that require fixing:
|
||||
|
||||
`php-cs-fixer list-files`
|
||||
|
||||
- Describe a rule or ruleset:
|
||||
|
||||
`php-cs-fixer describe {{rule}}`
|
Loading…
Add table
Reference in a new issue