squizlabs/php_codesniffer
PHP_CodeSniffer (PHPCS) provides phpcs to detect coding standard violations and phpcbf to automatically fix them. Tokenizes PHP files against defined standards to keep code clean and consistent, suitable for teams and CI.
phpcs/phpcbf commands integrate seamlessly into build scripts, and the PSR-12 standard is Laravel's default coding standard. Custom rulesets can be added via ruleset.xml without modifying core code.phpcbf) vs. manual fixes?require-dev) ensures dependency management aligns with Laravel's workflow, and it works with all PHP versions supported by Laravel 9+ (PHP 8.0+).squizlabs/php_codesniffer as a dev dependency via Composer.phpcs --standard=PSR12 app/) to identify violations.phpcbf for auto-fixable issues.laravel standard via laravel/coding-standard).phpcbf in CI for auto-fixable issues.composer update squizlabs/php_codesniffer). Requires periodic review of rulesets for new standards or deprecated sniffs. GitHub Actions workflows need minimal upkeep.--parallel flag. For monorepos, exclusion rules (<exclude-pattern>*/tests/*</exclude-pattern>) can optimize performance. No known scaling limitations for typical Laravel applications.How can I help you explore Laravel packages today?