Installs php-cs-fixer git hook automatically using a composer script
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
composer.json
php-cs-fixer.pre-commit.php
psr-police

README.md

PSR Police

A handy tool to add a PHP syntax check and PSR-2 enforcement git pre-commit hook to your project.

Install it globally like:

phpcomposer global require tacone/psr-police

Then make sure ~/.composer/vendor/bin is in your PATH.

From now on you can enforce PSR-2 on every commit by calling PSR Police (once per project):

cd /var/www/myproject
psr-police