Skip to content

Instantly share code, notes, and snippets.

View dimitrilongo's full-sized avatar
🏠
Working from home

Dimitri Longo dimitrilongo

🏠
Working from home
View GitHub Profile
@dimitrilongo
dimitrilongo / gist:0c459b85c4dbbfabb7d8
Created October 21, 2015 17:20 — forked from codemis/gist:8225337
A Git pre-commit hook for validating code follows PHP's Fig Coding Standard. The script requires PEAR's Code Sniffer library. Change the variables to fit your project code structure. Just drop this file in your .git/hooks/ directory. This script is a modified file created by Soenke Ruempler.
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <[email protected]>
# @author Sebastian Kaspari <[email protected]>
#
# see the README
PHPCS_BIN=/usr/local/bin/phpcs
PHPCS_CODING_STANDARD=PSR2