Skip to content

Instantly share code, notes, and snippets.

@cedriclombardot
Created August 27, 2012 12:13
Show Gist options
  • Save cedriclombardot/3487915 to your computer and use it in GitHub Desktop.
Save cedriclombardot/3487915 to your computer and use it in GitHub Desktop.
Check cs for files before commits
# See http://cs.sensiolabs.org
# Run this command in your git repo to run cs fixer on the modified files
git st --porcelain | cut -d" " -f2,3 | cut -d" " -f2 | xargs -I {} sh -c 'php php-cs-fixer.phar fix {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment