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
Copy file name to clipboardExpand all lines: tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php
+24-2Lines changed: 24 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -637,6 +637,7 @@ public function testBug8485(): void
637
637
[
638
638
'Strict comparison using === between Bug8485\E::c and Bug8485\E::c will always evaluate to true.',
639
639
19,
640
+
'Use match expression instead. PHPStan will report unhandled enum cases.',
640
641
],
641
642
[
642
643
'Strict comparison using === between Bug8485\F::c and Bug8485\E::c will always evaluate to false.',
@@ -657,12 +658,12 @@ public function testBug8485(): void
657
658
[
658
659
'Strict comparison using === between Bug8485\FooEnum::C and Bug8485\FooEnum::C will always evaluate to true.',
659
660
67,
660
-
'Remove remaining cases below this one and this error will disappear too.',
661
+
"• Remove remaining cases below this one and this error will disappear too.\n• Use match expression instead. PHPStan will report unhandled enum cases.",
661
662
],
662
663
[
663
664
'Strict comparison using === between Bug8485\FooEnum::C and Bug8485\FooEnum::C will always evaluate to true.',
664
665
74,
665
-
'Remove remaining cases below this one and this error will disappear too.',
666
+
"• Remove remaining cases below this one and this error will disappear too.\n• Use match expression instead. PHPStan will report unhandled enum cases.",
666
667
],
667
668
]);
668
669
}
@@ -936,4 +937,25 @@ public function testBug9104(): void
'Strict comparison using === between $this(StrictComparisonEnumTips\SomeEnum)&StrictComparisonEnumTips\SomeEnum::Two and StrictComparisonEnumTips\SomeEnum::Two will always evaluate to true.',
950
+
15,
951
+
"• Remove remaining cases below this one and this error will disappear too.\n• Use match expression instead. PHPStan will report unhandled enum cases.",
952
+
],
953
+
[
954
+
'Strict comparison using === between $this(StrictComparisonEnumTips\SomeEnum)&StrictComparisonEnumTips\SomeEnum::Two and StrictComparisonEnumTips\SomeEnum::Two will always evaluate to true.',
955
+
29,
956
+
'Use match expression instead. PHPStan will report unhandled enum cases.',
0 commit comments