Open rarila opened 10 months ago
I found these snippets:
That's expected - it reports InvalidDocblock - fix that error and you will have correct types.
In this case it's simple (bc they are identical), but what if the types were different?
@kkmuffme "fix that error"… sure, as long as it’s your code. But that can be in an upstream library and you you know that it sometimes can take time to get something fixed upstream ;-) (Btw, in my case here I got it fixed quite fast)
Anyway, the problem here isn’t that Psalm does not know what to do with the erroneous $string
, but Psalm get’s $array
wrong afterwards, that has correct doc. So IMHO even if types of $string
would be different, Psalm should get the $array
type correct.__
I wonder if Psalm should just fail with that duplicated param and get the other one correct?!
https://psalm.dev/r/2a4bdb7173