Skip to content

Instantly share code, notes, and snippets.

@aleferreiranogueira
Last active June 14, 2022 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aleferreiranogueira/bf6bfb173d080ce6e5f201e24f41634d to your computer and use it in GitHub Desktop.
Save aleferreiranogueira/bf6bfb173d080ce6e5f201e24f41634d to your computer and use it in GitHub Desktop.
Install PHPCBF and PHPCS
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
curl -L http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o php-cs-fixer
# Those files should be either on /usr/local/bin or /usr/bin depending on your machine
sudo mv phpcbf.phar /usr/local/bin/phpcbf
sudo mv phpcs.phar /usr/local/bin/phpcs
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
sudo chmod a+x /usr/local/bin/php-cs-fixer
sudo chmod a+x /usr/local/bin/phpcs
sudo chmod a+x /usr/local/bin/phpcbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment