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
When combining an array that has is_null() calls in its constructor and a match instruction, I get the array type to be reported *NEVER*.
*NEVER*
Match arm comparison between NEVER and array{t1: bool, t2: bool} is always false.
https://phpstan.org/r/d70c5c30-8cb5-4811-8c3f-ba6b8a29bab7
That code should be fine, at least it works perfectly well.
The text was updated successfully, but these errors were encountered:
@levu42 After the latest commit in 1.8.x, PHPStan now reports different result with your code snippet:
@@ @@ -PHP 8.0 – 8.1 (1 error) +PHP 8.0 – 8.1 ========== -22: Match arm comparison between *NEVER* and array{t1: bool, t2: bool} is always false. +No errors PHP 7.4 (3 errors) ==========
No errors
Syntax error, unexpected T_DOUBLE_ARROW on line 21
Syntax error, unexpected T_DOUBLE_ARROW on line 22
Syntax error, unexpected ',' on line 25
Syntax error, unexpected T_VARIABLE, expecting ')' on line 15
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Successfully merging a pull request may close this issue.
Bug report
When combining an array that has is_null() calls in its constructor and a match instruction, I get the array type to be reported
*NEVER*
.Code snippet that reproduces the problem
https://phpstan.org/r/d70c5c30-8cb5-4811-8c3f-ba6b8a29bab7
Expected output
That code should be fine, at least it works perfectly well.
The text was updated successfully, but these errors were encountered: