We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong here with the flow analysis
https://psalm.dev/r/eef81dd77c
Removing the redundant conditional also removes the TypeDoesNotContainType
TypeDoesNotContainType
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php function analyse(array $tokens): int { $state = 1; foreach ($tokens as $_) { switch ($state) { case 3: break; case 2: if (true) { $state = 3; } break; default: $state = 2; } } return $state; }
Psalm output (using commit 1afce4d): ERROR: TypeDoesNotContainType - 9:18 - int(3) cannot be identical to int(1)|int(2) ERROR: RedundantCondition - 12:21 - if (true) is redundant
Sorry, something went wrong.
Reduced slightly to
<?php function analyse(): int { $state = 1; while (rand(0, 1)) { switch ($state) { case 3: break; case 2: if (rand(0, 1)) { $state = 3; } break; default: $state = 2; } } return $state; }
d10a068
Fix vimeo#5001 - update variables after context after type change fro…
bd8df0e
…m empty Empty is the invalid state, and some old logic here was causing a bug
No branches or pull requests
Something wrong here with the flow analysis
https://psalm.dev/r/eef81dd77c
Removing the redundant conditional also removes the
TypeDoesNotContainType
The text was updated successfully, but these errors were encountered: