Nyholm / psr7

A super lightweight PSR-7 implementation
MIT License
1.16k stars 75 forks source link

Use static return annotation for best IDE method suggestion #164

Closed samizdam closed 3 years ago

samizdam commented 3 years ago

Also I prepare CS fixes and can merge its in forked master, if it is required:

https://github.com/samizdam/psr7/pull/1/files

Zegnat commented 3 years ago

Static return types are different from self on the language level. And both are valid return types starting in PHP 8. So I would prefer to not put something in the DocBlock when it is not what is actually being returned.

Sounds like this should be a feature request to the IDE to add support for both static and self?

Am I missing something obvious?