-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
It seems the @var annotation is ignored in favor of phpstan detecting the array type from the first insertion done into it. However it ends up with a static value for a string which can be start or end.
Code snippet that reproduces the problem
https://phpstan.org/r/c035c7a7-c737-45e0-8d9e-fa5413d22d8b
Expected output
This should error on line 6 as I am inserting an invalid value into the array.
If I explicit type something I expect it to follow that, not try to guess.
Note that using @phpstan-var or @var does not seem to be making any difference.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels