Install an execute script of specify quality tools to your git pre-commit hook, and it executes only for changed files
composer global require kayw/quality-hook-installerquality run install --phpstan --php-cs-fixer- Execute
git add .in your project. git commit -m 'xxx'- The pre-commit hook will be triggered and the PHPStan and PHPCsFixer will execute only for changed files.
The following command will execute quality inspection only for changed files
quality run --phpstan --php-cs-fixer
The following command will write in your pre-commit of git hook
quality run install --phpstan --php-cs-fixer
The following command will remove your pre-commit of git hook
quality run uninstall