Skip to content

Instantly share code, notes, and snippets.

View rkaldung's full-sized avatar
🎯
Removing dust from the grey market

Roy Kaldung rkaldung

🎯
Removing dust from the grey market
View GitHub Profile
@rkaldung
rkaldung / pre-commit
Last active December 14, 2015 08:39
git pre-commit hook with php lint and code style fix
#!/bin/sh
#
# adjust php-cs-fixer configuration if needed, see http://cs.sensiolabs.org/
# Redirect output to stderr.
exec 1>&2
for f in $(git diff --cached --name-only --diff-filter=AMC | grep -e '\.php$')
do
php -l "${f}" || exit 1