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
{{ message }}
Repository navigation
Commit be6f4de
Browse filesBrowse the repository at this point in the historyBrowse files
Describe types with getRecommendedLevelByType in impossible haystack value errors
Instead of VerbosityLevel::precise(), which leaked internal notation like
mixed~'installed' into the message. The resulting ambiguity (needle type
"mixed") is resolved the same way StrictComparisonOfDifferentTypesRule does
it: the reasons from resolveIdenticalType()/resolveEqualType() are attached
via acceptsReasonsTip().
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N3Ak8RnnYpuCDFH9fFQ1um
Copy file name to clipboardExpand all lines: tests/PHPStan/Rules/Comparison/ImpossibleInArrayHaystackFiniteTypesRuleTest.php
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,11 @@ public function testRule(): void
45
45
'Value ImpossibleInArrayFiniteTypes\Foo::TWO in the haystack passed to in_array() can never be identical to the needle type ImpossibleInArrayFiniteTypes\Foo::ONE.',
46
46
48,
47
47
],
48
+
[
49
+
'Value \'installed\' in the haystack passed to in_array() can never be identical to the needle type mixed.',
50
+
98,
51
+
'Type \'installed\' has already been eliminated from mixed.',
0 commit comments