-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Description
Bug report
It seems that phpstan does not know that self::Foo->value
in the below example is a string.
The enum is string backed, while phpstan thinks the value could be string|int
Code snippet that reproduces the problem
https://phpstan.org/r/ad018c7e-3eb6-4b13-ae38-254707335b82
PHPDoc tag @var for constant AStringBackedEnum::ZIP_CODE_MAPPING with type array<string, array<int, string>> is incompatible with value non-empty-array<int|string, 'yeah'>.
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
Every day buddy!
Metadata
Metadata
Assignees
Labels
No labels