Skip to content

Instantly share code, notes, and snippets.

@akovalyov
akovalyov / pre-commit
Last active September 7, 2016 14:33 — forked from cgmartin/pre-commit
Global hook - git config --global init.templatedir '~/.git_template'
#!/usr/bin/env php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP errors (lint), and make sure the
* code is PSR-2 compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*/