phpcs

phpcs

TLDR

Sniff the specified directory for issues (defaults to the PEAR standard)

$ phpcs [path/to/directory]
copy

Display a list of installed coding standards

$ phpcs -i
copy

Specify a coding standard to validate against

$ phpcs [path/to/directory] --standard [standard]
copy

Specify comma-separated file extensions to include when sniffing

$ phpcs [path/to/directory] --extensions [file_extension(s)]
copy

Specify the format of the output report (e.g. full, xml, json, summary)

$ phpcs [path/to/directory] --report [format]
copy

Set config variables to be used during the process

$ phpcs [path/to/directory] --config-set [key] [value]
copy

A comma-separated list of files to load before processing

$ phpcs [path/to/directory] --bootstrap [file(s)]
copy

Don't recurse into subdirectories

$ phpcs [path/to/directory] -l
copy

Copied to clipboard
Swissborg