Skip to content

Instantly share code, notes, and snippets.

@fhferreira
Forked from wowo/pre-commit
Last active August 29, 2015 14:24
Show Gist options
  • Save fhferreira/92d19f5050fd1c5d77e1 to your computer and use it in GitHub Desktop.
Save fhferreira/92d19f5050fd1c5d77e1 to your computer and use it in GitHub Desktop.
#!/bin/bash
exec < /dev/tty
phpunit
rc=$?
if [[ $rc != 0 ]] ; then
echo -n "It looks like some of your tests failed. "
exit $rc;
fi
phpcs -n --standard=PSR2 module/
rc=$?
if [[ $rc != 0 ]] ; then
echo -n "It looks like you made some code style violations "
exit $rc;
fi
exit $rc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment