composer require --dev vimeo/psalm
Add a config:
Then run Psalm:
The config created above will show you all issues in your code, but will emit
INFO issues (as opposed to
ERROR) for certain common trivial code problems. If you want a more lenient config you can specify the level with
./vendor/bin/psalm --init [source_dir] [level]
You can also learn how to suppress certain issues.
Want to know more? Check out the docs!