Skip to content

Code quality: phpcs

Bruno P. Kinoshita edited this page Apr 6, 2016 · 1 revision

You have to install phpcs. There are different ways to install it. One option is to run.

composer global require "squizlabs/php_codesniffer=*"

And then add ~/.composer/vendor/bin/ to your PATH environment variable. After that you should be able to run phpcs from within the project working directory.

find . -name '*.php' -exec ~/.composer/vendor/bin/phpcs {} \;

That will output errors and warnings to your console output. You can redirect the output to a file should you would like it.

Clone this wiki locally