Incorrect use of templated parameters for static functions in templated interfaces
Opened this issue · 3 comments
LuckyRu commented
Example: https://psalm.dev/r/a2b077f2e5
Comment of @weirdan: vimeo/psalm#2571 (comment)
ogizanagi commented
Hmm, so we need to add the @template T of int|string
line to each static methods, but using the same template name (T
) would generate a "Duplicate template param T in docblock for EnumInterface::get" so we need to use another name… this is a bit annoying :/
LuckyRu commented
I think we don't need templates in static methods
bendavies commented
i guess this is the cause of this psalm error:
Argument 1 of USState::accepts expects Elao\Enum\T, string provided