vimeo / psalm

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

Using constants as array key for object like array #3555

Open dmolineus opened 4 years ago

dmolineus commented 4 years ago

I like to describe an object like array using class constants for the key. Using array<TKeyType, TValueType> doesn't fit my needs as it's clear which keys exists.

https://psalm.dev/r/4fcbabd07c

psalm-github-bot[bot] commented 4 years ago

I found these snippets:

https://psalm.dev/r/4fcbabd07c ```php ' INFO: MixedInferredReturnType - 16:63 - Could not verify return type 'Message' for Message::createFromPayload ```