I now recommend

GURU is a fast, secure, modern web hosting company in the UK

Fast, secure, modern web hosting with 1 free SSL certificate

Every developer has a different coding style, this makes code difficult to maintain over time. In a large team of developers this can make code confusing and unmaintainable.

Using the assistance of static code analysis tools, developers can get help to avoid common mistakes by enforcing coding standards, detecting common errors and cleaning up blocks of code.

Fortunately there are a wide variety of tools available to developers to use. Here is a list of different tools that you can use in your next project.

These tools are available in a Docker image found here made by https://www.linkedin.com/in/jakubzalas/.


Name Description URL
analyze Tool helping developers analyse software projects. https://github.com/Qafoo/QualityAnalyzer
dephpend Detect flaws in your architecture, before they drag you down into the depths of dependency hell. https://dephpend.com/
deprecation-detector Static code analysis against your project’s source code to find usages of deprecated methods, classes and interfaces. For Symfony projects, it also detects usages of deprecated services. It identifies the use of deprecated code thanks to the @deprecated annotation. https://github.com/sensiolabs-de/deprecation-detector
deptrac Keep your architecture clean. https://github.com/sensiolabs-de/deptrac
design-pattern Detection of design patterns in PHP code https://github.com/Halleck45/DesignPatternDetector
parallel-lint This tool check syntax of PHP files faster than serial check with fancier output.

pdepend Software analyser and metric tool.

phan Static analyser for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness. https://github.com/etsy/phan
php-code-analyzer Finds usage of non-built-in extensions in your php code. https://github.com/wapmorgan/PhpCodeAnalyzer
php-code-fixer Finds deprecated functions, wrong functions usage, variables, ini directives and restricted identifiers in your php code. It literally helps you fix code that can fail after migration to PHP 7.  http://wapmorgan.github.io/PhpCodeFixer/
php-coupling-detector Tool detects all the coupling issues of your project with respect to the coupling rules you have defined.  https://akeneo.github.io/php-coupling-detector/
php-cd-fixer Fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents and many more.  http://cs.sensiolabs.org/
php-formatter PHP Formatter is a PHP developer friendly set of tools  https://github.com/mmoreram/php-formatter
php-semver-checker Compares two source sets and determines the appropriate semantic versioning to apply.  https://github.com/tomzx/php-semver-checker
phpDocumentor phpDocumentor enables you to generate documentation from your PHP source code. This documentation provides an in-depth view of your project to you, your consumers and contributors.  https://www.phpdoc.org/
phpa Tool to detect assumptions.  https://github.com/rskuipers/php-assumptions
phpcb Generates a browsable representation of PHP code where sections with violations found by quality assurance tools such as PHP_CodeSniffer or PHPMD are highlighted.  https://github.com/mayflower/PHP_CodeBrowser
phpcbf Tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.  https://github.com/squizlabs/PHP_CodeSniffer
phpcpd Copy/Paste Detector (CPD) for PHP code.  https://github.com/sebastianbergmann/phpcpd
phpcs Tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.  https://github.com/squizlabs/PHP_CodeSniffer
phpda Static code analysis to find violations in a dependency graph.  https://mamuz.github.io/PhpDependencyAnalysis/
phpdoc-to-typehint Adds automatically scalar type hints and return types to all functions and methods of a PHP project using existing PHPDoc annotations.  https://github.com/dunglas/phpdoc-to-typehint
phploc A tool for quickly measuring the size of a PHP project.  https://github.com/sebastianbergmann/phploc
phpmd Scans code for possible bugs, suboptimal code, overcomplicated expressions, unused parameters, methods and properties.  https://phpmd.org/
phpmetrics PhpMetrics provides various metrics about PHP projects.

phpmnd PHP Magic Number Detector  https://github.com/povils/phpmnd
phpstan PHP Static Analysis Tool – discover bugs in your code without running it!

psalm  A static analysis tool for PHP