Use pre-commit-hook.sh to enforce coding standards and maintain code quality in your project. It is ideal for legacy codebases because it runs only on new or modified files, analyzing only the relevant lines to avoid flooding you with warnings from existing code.
The hook is fully customizable, you can define custom PHP_CodeSniffer rulesets and rules tailored to your project's need.
