You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -74,6 +73,7 @@ The `args` property in your hook declaration can be used for pass any valid PHP
74
73
files: \.(php)$
75
74
args: [--standard=PSR1 -p]
76
75
```
76
+
77
77
Similar pattern as the php-cs hook. A bash script that will run the appropriate [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) executable and will try to fix errors if it can using phpcbf.
78
78
79
79
It will assume that there is a valid PHP Code Beautifier and Fixer executable at these locations, `vendor/bin/phpcbf`, `phpcbf` or `php phpcbf.phar` (in that exact order).
@@ -94,6 +94,7 @@ If you have multiple standards or a comma in your `args` property, escape the co
94
94
To install PHP Codesniffer (phpcs & phpcbf), follow the [recommended steps here](https://github.com/squizlabs/PHP_CodeSniffer#installation).
@@ -102,15 +103,14 @@ To install PHP Codesniffer (phpcs & phpcbf), follow the [recommended steps here]
102
103
files: \.(php)$
103
104
args: [--level=PSR2]
104
105
```
106
+
105
107
Similar pattern as the php-cs hook. A bash script that will run the appropriate [PHP Coding Standards Fixer](http://cs.sensiolabs.org/) executable and to fix errors according to the configuration. It accepts all of the args from the `php-cs-fixer` command, in particular the `--level`, `--config`, and `--config-file` options.
106
108
107
109
The tool will fail a build when it has made changes to the staged files. This allows a developer to do a `git diff` and examine the changes that it has made. Remember that you may omit this if needed with a `SKIP=php-cs-fixer git commit`.
0 commit comments