phpcs Command Examples

Tokenize PHP, JavaScript and CSS files to detect violations of a defined set of coding standards. More information: https://github.com/squizlabs/PHP_CodeSniffer.

phpcs {{path/to/directory}}

phpcs -i

phpcs {{path/to/directory}} --standard {{standard}}

phpcs {{path/to/directory}} --extensions {{file_extension1,file_extension2,...}}

phpcs {{path/to/directory}} --report {{format}}

phpcs {{path/to/directory}} --config-set {{key}} {{value}}

phpcs {{path/to/directory}} --bootstrap {{path/to/file1,path/to/file2,...}}

phpcs {{path/to/directory}} -l