Created
January 27, 2015 22:16
-
-
Save kevincolten/6bc2ab9a96017567b993 to your computer and use it in GitHub Desktop.
Run PHP_CodeSniffer on files with uncommitted changes
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
if [ "$(git diff --name-only master --diff-filter=AMR | grep -Ei "^.*app\/(models|controllers)\/.*\.php$")" ]; then vendor/bin/phpcs $(git diff --name-only master --diff-filter=AMR | grep -Ei "^.*app\/(models|controllers)\/.*\.php$") --standard=PSR2; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment