Introducing a static analysis tool would allow to have a layer similar to TypeScript's type checking. [PHPStan](https://phpstan.org/) is a good option, but we would need to make sure it does not detect WordPress core functions as undefined.
Introducing a static analysis tool would allow to have a layer similar to TypeScript's type checking.
PHPStan is a good option, but we would need to make sure it does not detect WordPress core functions as undefined.