composer g require --dev automattic/vipwpcs dealerdirect/phpcodesniffer-composer-installer -W
brew install composer
export PATH="$HOME/.composer/vendor/bin:$PATH"
cd ~
cat >> .zshrc
export PATH="$HOME/.composer/vendor/bin:$PATH"
^C
which phpcs
/Users/<username>/.composer/vendor/bin/phpcs
composer g config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer g require --dev dealerdirect/phpcodesniffer-composer-installer:"^0.7" phpcompatibility/phpcompatibility-wp:"*"
- Open vscode
- Install the phpcs extension from the marketplace.
- Press CMD+, to open the settings tab.
- Search for "phpcs:Executable Path" and add "/Users/<username>/.composer/vendor/bin/phpcs" to it.