Crocoblock / suggestions

The suggestions for CrocoBlock project
196 stars 79 forks source link

Correct type declarations please #7799

Open aayla-secura opened 1 month ago

aayla-secura commented 1 month ago

I have a feeling this will never get considered, but I'm putting it out there.

For developers like me who emphasize strong type checking, it's kind of difficult to integrate JetEngine into a project, because your type declarations inside the PHPDoc comments are incorrect or missing. Most PHPDocs contain templated string, like [type], which are invalid, or plain wrong types, like null where it's meant to be string or something. In places there are no type declarations at all. So in all those cases I have to use explicit type assertions in my code for values returned by JetEngine functions in order to keep PHPStan happy, which defeats the purpose of type checking.

It's poor practice, hinders work of integrating JetEngine into strongly typed projects, and hints to a general lack of type checks and static testing, which for me personally erodes my confidence in the plugin.

I'd like to make a suggestion that you guys update your PHPDoc type declarations.