Skip to content

Instantly share code, notes, and snippets.

@PululuK
Created May 26, 2021 10:10
Show Gist options
  • Save PululuK/07ac93607dd6a30c90f9034f32117dcd to your computer and use it in GitHub Desktop.
Save PululuK/07ac93607dd6a30c90f9034f32117dcd 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