You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ah okay, this is a bit different than I thought.. Looks like the problem is the SpecifiedTypes intersection again. The left part creates a null sureType, the right part a '' sureNotType and those cannot be intersected like that. It would work if both parts have a sureType or a sureNotType for $s. I'm thinking about my weird SubtractedType solution again which could work somehow by transforming between those types if needed in e.g. the normalization, but it is, well, weird :D And I assume there will be some edge cases again where it won't work and needs workarounds..
An alternative might be to somehow use the current type via scope in the Identical specification, but that one is quite complex with many different paths, need to take a deeper look later.
Bug report
This is just the bug that is behind phpstan/phpstan-webmozart-assert#33 as Ondrej mentioned there.
Fyi I know where to look and I think the fix should be trivial (at least I hope so), will try to open a PR for this soon.
Code snippet that reproduces the problem
https://phpstan.org/r/6485efa1-485c-4abb-8611-155ce3a05e74
Expected output
No errors.
Did PHPStan help you today? Did it make you happy in any way?
Just updated PHPStan in some projects, which resulted in 2 baseline error removals. yay :)
The text was updated successfully, but these errors were encountered: