-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Labels
Description
Do I misunderstand the @psalm-assert-if-true Assertion?
The Uuid::isValid method has a psalm assertion @psalm-assert-if-true non-empty-string $uuid set.
This assertion seems to lead Psalm to think that only non-empty-strings can be given to this method and any false validation means that the given string is empty.
At least that's what I'm guessing after receiving the following error
All possible types for this argument were invalidated - This may be dead code
in a project of mine.
Example code
Here's a simplified version of the problematic code. I've just mocked a Uuid::isValid implementation for demo purposes.
Reactions are currently unavailable