Skip to content
On this page

Static Analysis

PHP Stan

We're big fans of static analysis and strict typing. It enables you to catch loads of logic bugs before you even run a single line of code, and although it doesn't obviate the need for them, we find ourselves writing fewer tests.

Our library of choice is PHP Stan. Forme plugin and theme boilerplates come with a phpstan.neon.example that you can edit and set up for your own environment.

You can run it on the command line within plugin and theme projects via the following composer command:

bash
composer stan

Made by Moussa Clarke @ Sanders Web Works with ❤️