phpstan

Static analysis tool for finding bugs in PHP code without running it

brewmacoslinux
Try with needOr install directly
Source

About

PHP Static Analysis Tool

Commands

phpstan

Examples

Analyze a single PHP file for errors$ phpstan analyse path/to/file.php
Analyze entire project directory with custom configuration$ phpstan analyse src/ -c phpstan.neon
Run analysis with specific rule level (0-9, higher is stricter)$ phpstan analyse app/ -l 7