Skip to content
David Maus M. A.

Today I Learned: Static code analysis for PHP projects

David Maus, 28. Aug 2019

Static code analysis for PHP project has gone a long way. Phan and PHPStan are two tools that use static code analysis to detect errors in my PHP project files.

Both are installed via Composer:

Installing Phan & PHPStan
dmaus@carbon ~/projects/php-project % composer require --dev phan/phan
dmaus@carbon ~/projects/php-project % vendor/bin/phan --init --init-level=1
dmaus@carbon ~/projects/php-project % composer require --dev phpstan/phpstan