PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
composer require squizlabs/php_codesniffer