Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. EXIT_STATUS=$?
  2. if [ $EXIT_STATUS -eq 0 ]; then
  3. echo -e "\tSymfony dump() function found. Please remove and commit again."
  4. echo "$DIRTY_DUMP"
  5. exit 1
  6. fi
  7. echo -e "\tdone."
  8.  
  9. echo -e "\tphp-cs-fixer..."
  10. if [ -x $PHP_CS_FIXER ]; then
  11. $PHP_CS_FIXER --version
  12. git status --porcelain | grep -e '^[AM]\(.*\).php$' | sed -e 's/^[AM]\s*//' |
  13. while read line; do
  14. $PHP_CS_FIXER fix --config=$ROOT/.php_cs.dist --quiet "$line"
  15. git add "$line"
  16. done
  17. else
  18. echo "Please check if you have installed the project dependencies with:"
  19. echo -e "\tcomposer install"
  20. echo "Or install a local php-cs-fixer:"
  21. echo -e "\tcomposer require --dev friends-of-php/php-cs-fixer"
  22. exit 1
  23. fi
  24. echo -e "\tdone."
  25.  
  26. echo "pre-commit hook done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement