Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcchikikomori/bc7093ca03e4277a7e1483d8ce983b41 to your computer and use it in GitHub Desktop.
Save jcchikikomori/bc7093ca03e4277a7e1483d8ce983b41 to your computer and use it in GitHub Desktop.
PHPCS + WordPress Coding Standards
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install composer
brew install homebrew/php/composer
### PHPCS
composer global require "squizlabs/php_codesniffer=*"
# Add to your .bash_profile
export PATH=$PATH:~/.composer/vendor/bin
#### WordPress Coding Standards
composer global require "wp-coding-standards/wpcs"
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
phpcs --config-set default_standard WordPress-Extra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment