Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

41
php-cs-fixer Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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}}`