Created
February 12, 2018 18:06
-
-
Save jaredatch/516a633f4e23ba3463e353616237fd1f to your computer and use it in GitHub Desktop.
Revisions
-
jaredatch created this gist
Feb 12, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ # Install PHPCS with MAMP Pro [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) There are different ways to install PHPCS, the method below uses PEAR which installs it within your PHP installation. First, locate the active MAMP Pro PHP installation. ``` $ which php ``` It will return something similar to `/Applications/MAMP/bin/php/php7.2.1/bin/php`. Go to the `bin` directory. ``` $ pear install PHP_CodeSniffer ``` That will install PHPCS. 💥 As I bonus, configure it to work with WPCS (which has been already downloaded) ``` $ phpcs --config-set installed_paths ~/.scripts/wpcs ``` #### Notes: When MAMP updates are installed, they generally include updated versions of PHP. So make a note that when you update MAMP (or if you toggle between PHP versions) you will need to reinstall PHPCS.