Categories
Web Development

How to Install PHP_Codesniffer (phpcs)

Honestly, follow the instructions at this link for the best results: https://github.com/squizlabs/PHP_CodeSniffer

(but the executable path is /usr/bin/phpcs on linux)

I recommend you have composer already to install this but as you can see from their instructions, you can get by without composer (it is just not as simple).

An overview of what you are doing in the instructions:

  1. downloading the phar files.
  2. Using composer to make the codesniffer available globally.
  3. Adding the new phpcs to your PATH system variable

Leave a Reply