Skip to content

Instantly share code, notes, and snippets.

View carlosas's full-sized avatar
:shipit:

Carlos A Sastre carlosas

:shipit:
View GitHub Profile
# PHP Architecture Tester pre-commit hook for git
#
# @author Carlos Alandete <carlos.alandete@gmail.com>
#
STAGED_FILES_PHP=$(git diff --cached --name-only --diff-filter=ACM | grep '^src.*\.php\?$')
if [[ "$STAGED_FILES_PHP" == "" ]]; then
printf "\033[1;32mNo files that could affect PHP Architecture Tester\033[0m\n\n"
exit 0
fi