framework icon indicating copy to clipboard operation
framework copied to clipboard

PHPStan Setup

Open askvortsov1 opened this issue 4 years ago • 2 comments

PHP doesn't give us that much built-in type safety. With PHPStan, we could perform static analysis to confirm:

While this probably won't be 100% ideal (especially when it comes to editor integration), it would be a HUGE step up from where we are now.

askvortsov1 avatar Oct 14 '21 14:10 askvortsov1

phpstan is a default plugin in phpStorm, but I never noticed closure typings or array shapes before 😬, that's neat.

Yeah, we should definitely have it setup. Perhaps I can start by going through the backend and add closure typings first.

SychO9 avatar Oct 15 '21 15:10 SychO9

I'll push my changes on this tonight hopefully so that we can get the list of legit errors we need to fix, and work on building stubs/fixes for any remaining ones.

tankerkiller125 avatar Nov 09 '21 13:11 tankerkiller125