Over the last few years static analysis in PHP, and more specifically Laravel, has become more and more popular. Up until this point I had struggled getting a good static analysis coverage in Laravel using https://phpstan.org/ or https://psalm.dev/. Larastans rules allowed me to start applying more static analysis to my code base, and in turn having a lot more confidence in my code.
Now if we run static analysis again, we should have gotten rid of those errors: composer phpstan Note: Using configuration file /Users/steve/code/sites/larastan-test/phpstan.neon.
What we do next is iterate through our application, making sure that we run our static analysis checks at important points.