vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.55k stars 660 forks source link

Placeholders are not resolved for static methods #10641

Open HypeMC opened 8 months ago

HypeMC commented 8 months ago

Currently, placeholders aren't resolved properly when the method is static:

https://psalm.dev/r/8f3633e052

psalm-github-bot[bot] commented 8 months ago

I found these snippets:

https://psalm.dev/r/8f3633e052 ```php $models */ public function nonStaticMethod(array $models): static; /** * @param list $models */ public static function staticMethod(array $models): static; } ``` ``` Psalm output (using commit bf57d59): ERROR: UndefinedDocblockClass - 16:15 - Docblock-defined class, interface or enum named T does not exist ```