Skip to content

Instantly share code, notes, and snippets.

@bahiirwa
Forked from aleferreiranogueira/phpcs_cbf.sh
Created June 14, 2022 06:42
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 bahiirwa/c573d691ac7fddd1efca4636ce078076 to your computer and use it in GitHub Desktop.
Save bahiirwa/c573d691ac7fddd1efca4636ce078076 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