The PHP Analyzer performs static analysis on your source code to help you find errors and bugs, and also has built-in heuristics to automatically fix some of them.
Learn more in the documentation.
PHPAnalyzer can be installed via composer very easily:
composer create-project scrutinizer/php-analyzer:dev-master
Please note that PHP Analyzer cannot be installed as a dependency of your root project currently, but must be installed as a standalone project. Also, PHP Analyzer itself needs a PHP 5.4 runtime; this requirement only applies to the system that is running PHP Analyzer, not the code that is analyzed.
php bin/phpalizer run some-dir
The CLI is especially useful to analyze smaller libraries, or for testing purposes.
For bigger libraries with dependencies, it is recommended to use a dedicated build system. You can set-up such a build system on your own architecture, or use a hosted service like scrutinizer-ci.com.