Skip to content

Instantly share code, notes, and snippets.

@benji07
Created March 26, 2012 08:48
Show Gist options
  • Save benji07/2203968 to your computer and use it in GitHub Desktop.
Save benji07/2203968 to your computer and use it in GitHub Desktop.
Qualité du Code : PHPCS
cd /path/to/pear/PHP/CodeSniffer/Standards
git clone git://github.com/opensky/Symfony2-coding-standard.git Symfony2
phpcs --config-set default_standard Symfony2
FILE: .../src/Benji07/BlogBundle/Entity/Post.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
335 | ERROR | Missing blank line before return statement
--------------------------------------------------------------------------------
Time: 3 seconds, Memory: 12.50Mb
pear install PHP_CodeSniffer
git status --porcelain | grep -E '^[^D\?]{2} .*\.php$' | awk '{print $2}' | xargs -n1 phpcs
phpcs src/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment