Is there a way to run type checking ahead of time similat to typescript or python's mypy or pyright?
Jetbrains PHPStorm has this sort of type resolution built in (one of their value adds) but you can also run PHPStan instead of their proprietary version.