From 2c1691c48f8270f1a579d987bb8ed77ab8a3697d Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Sun, 2 Oct 2022 03:23:51 +0100 Subject: [PATCH] php-cs-fixer: add page (#8577) * php-cs-fixer: add page * php-cs-fixer: apply fixes from code review --- pages/common/php-cs-fixer.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/php-cs-fixer.md diff --git a/pages/common/php-cs-fixer.md b/pages/common/php-cs-fixer.md new file mode 100644 index 000000000..b0f8fbd34 --- /dev/null +++ b/pages/common/php-cs-fixer.md @@ -0,0 +1,36 @@ +# PHP-CS-Fixer + +> Automatic coding style fixer for PHP. +> More information: . + +- 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}}`