snippetbashTip
php-cs-fixer — Automatic coding style fixer for PHP. More information: <https://github.com/PHP-CS-Fixer/PHP-CS-Fixe
Viewed 0 times
commandcodingstylecliautomaticfixerphp-cs-fixerfor
Problem
How to use the
php-cs-fixer command: Automatic coding style fixer for PHP. More information: <https://github.com/PHP-CS-Fixer/PHP-CS-Fixer>.Solution
php-cs-fixer — Automatic coding style fixer for PHP. More information: <https://github.com/PHP-CS-Fixer/PHP-CS-Fixer>.Execute code style fixing in the current directory:
php-cs-fixer fixExecute 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-runExecute code style fixes using specific rules:
php-cs-fixer fix --rules={{rules}}Display the rules that have been applied:
php-cs-fixer fix --verboseOutput 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-filesDescribe a rule or ruleset:
php-cs-fixer describe {{rule}}Code Snippets
Execute code style fixing in the current directory
php-cs-fixer fixExecute 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-runExecute code style fixes using specific rules
php-cs-fixer fix --rules={{rules}}Display the rules that have been applied
php-cs-fixer fix --verboseContext
tldr-pages: common/php-cs-fixer
Revisions (0)
No revisions yet.