Last active
March 8, 2019 13:56
-
-
Save dborsatto/1c2de53a91064bf224b06f01583ab25b to your computer and use it in GitHub Desktop.
Execute php-cs-fixer as a Git pre-commit hook
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 diff --name-only --cached --diff-filter=ACMRTUXB | while read filename; do | |
php-cs-fixer fix $filename | |
git add $filename | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment