sniff 551 B

123456789101112131415161718
  1. #!/bin/bash
  2. # Make sure this file is executable
  3. # chmod +x sniff
  4. if [ `echo "$@" | grep '\-\-fix'` ] || [ `echo "$@" | grep '\-f'` ]; then
  5. FIX=1
  6. else
  7. FIX=0
  8. fi
  9. if [ "$FIX" = 1 ]; then
  10. # Sniff and fix
  11. vendor/bin/phpcbf --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=cakephp-tools/vendor/,tmp/,logs/,tests/test_files/ --extensions=php -v -f ./
  12. else
  13. # Sniff only
  14. vendor/bin/phpcs --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=cakephp-tools/vendor/,tmp/,logs/,tests/test_files/ --extensions=php -v ./
  15. fi