Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# PHP CodeSniffer pre-receive hook for git
PHPCS_BIN="/usr/bin/phpcs"
PHPCS_CODING_STANDARD="YiiIntersvyaz"
# 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"