Created
June 27, 2018 07:48
-
-
Save alongosz/32cb751ce9570e4fb525ddc47dd03d7e to your computer and use it in GitHub Desktop.
Applies php-cs-fixer to the code staged for commit
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
#!/bin/bash | |
# | |
# Copyright (c) 2017 - 2018, Andrew Longosz | |
# | |
files=$(git diff --cached --name-only --diff-filter=ACMRTU|grep '.php$'|paste -sd ' ' -) | |
echo "Fixing new and/or modified files: $files" | |
php-cs-fixer -v --config=.php_cs fix $files | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment