php-collective/code-sniffer
PHP_CodeSniffer ruleset from PhpCollective. PSR-2 compliant with many extra sniffs/fixers (incl. PSR-12) plus an optional stricter standard (PhpCollectiveStrict). Install via Composer and run phpcs/phpcbf, or wire into CI/IDE.
PhpCollective Code Sniffer is a PHP_CodeSniffer standards package that fully follows PSR-2 and includes many additional sniffs and fixers (including PSR-12). Add it as a require-dev dependency and reference its ruleset from your project’s phpcs.xml to enforce consistent code style across src/ and tests/.
Use phpcs to detect violations and phpcbf to automatically fix them, or wire both into Composer scripts for quick shortcuts. A stricter PhpCollectiveStrict standard is also available for tighter rules.
phpcs.xml ruleset referencevendor/bin/phpcs for checks and vendor/bin/phpcbf for auto-fixesHow can I help you explore Laravel packages today?