PHP_CodeSniffer
31 August 2025 (Updated 2 September 2025)
PHP_CodeSniffer is a PHP tool that helps you detect potential issues and automatically fix some of them.
Getting started
Install:
composer require squizlabs/php_codesniffer --dev
Detect issues:
./vendor/bin/phpcs
Fix issues
./vendor/bin/phpcbf
Integrate with PHPStorm

View list of sniffs configured for your project
./vendor/bin/phpcs -e
Tagged:
PHP tooling