Created
March 26, 2012 08:48
-
-
Save benji07/2203968 to your computer and use it in GitHub Desktop.
Qualité du Code : PHPCS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /path/to/pear/PHP/CodeSniffer/Standards | |
git clone git://github.com/opensky/Symfony2-coding-standard.git Symfony2 | |
phpcs --config-set default_standard Symfony2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pear install PHP_CodeSniffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status --porcelain | grep -E '^[^D\?]{2} .*\.php$' | awk '{print $2}' | xargs -n1 phpcs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phpcs src/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment