PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.
It checks the input PHP source code and reports any deviations from the coding convention.
The tool uses the PEAR Coding Standards as the default coding convention. But it allows you to configure it to suit your coding standards.
Please visit https://github.com/PHPCheckstyle/phpcheckstyle/wiki for more information and documentation.