Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kpodemski/093db13cacfa8122ffa246037d794f95 to your computer and use it in GitHub Desktop.
Save kpodemski/093db13cacfa8122ffa246037d794f95 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILES_TO_COMMIT=`git status -s | cut -c4-`
if [[ ! -z $FILES_TO_COMMIT ]]; then
for file in $FILES_TO_COMMIT; do
if [[ "$file" == *.php ]]; then
./vendor/bin/php-cs-fixer fix "$file"
fi
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment