Pre-commit scripts appropiate for *any* PHP project. These hooks are made as custom plugins under the [pre-commit](http://pre-commit.com/#new-hooks) git hook framework.
% pre-commit run --all-files php-stan
<a bunch of errors appear here>
% echo 'not a valid config file' >phpstan.neon
% pre-commit run --all-files php-stan
PHPStan..................................................................Passed
% pre-commit run --all-files --verbose php-stan
PHPStan..................................................................Passed
- hook id: php-stan
- duration: 0.76s
Begin PHPStan
Running command vendor/bin/phpstan analyse ….php
────────────────────────────────────────────────────────────────────────────────
Note: Using configuration file …/phpstan.neon.
No rules detected
You have the following choices:
* while running the analyse option, use the --level option to adjust your rule level - the higher the stricter
* create your own custom ruleset by selecting which rules you want to check by copying the service definitions from the built
-in config level files in phar:///…/vendor/phpstan/phpstan/phpstan.phar/conf.
* in this case, don't forget to define parameter customRulesetUsed in your config file.
…