diff --git a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php index c1987ae689..7b68ee5a1d 100644 --- a/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php @@ -83,4 +83,9 @@ public function testBug3153(): void $this->analyse([__DIR__ . '/data/bug-3153.php'], []); } + public function testBug5707(): void + { + $this->analyse([__DIR__ . '/data/bug-5707.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Comparison/data/bug-5707.php b/tests/PHPStan/Rules/Comparison/data/bug-5707.php new file mode 100644 index 0000000000..3a93703d60 --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/data/bug-5707.php @@ -0,0 +1,16 @@ + 0; --$l) { + } + + return 'x'; + } +}