Skip to content

Instantly share code, notes, and snippets.

View abienvenu's full-sized avatar

Arnaud Bienvenu abienvenu

View GitHub Profile
@bor
bor / phpcs-git-hook-pre-receive
Created September 30, 2011 11:27
PHP CodeSniffer pre-receive hook for git
#!/bin/sh
# PHP CodeSniffer pre-receive hook for git
PHPCS_BIN="/usr/bin/phpcs"
PHPCS_CODING_STANDARD="PEAR"
# use coding standart dir from local repo
PHPCS_DIR_LOCAL=0
TMP_DIR=$(mktemp -d --tmpdir phpcs-pre-receive-hook.XXXXXXXX)
mkdir "$TMP_DIR/source"