Skip to content

Commit 2b059ba

Browse files
phpstan-botclaude
authored andcommitted
Add non-regression rule tests for strict comparison false positives
Add rule tests for bug-14407 and bug-13421 to verify that the strict comparison rule no longer reports false positive errors on these files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3664373 commit 2b059ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesRuleTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,4 +1172,16 @@ public function testBug11054(): void
11721172
]);
11731173
}
11741174

1175+
#[RequiresPhp('>= 8.1')]
1176+
public function testBug14407(): void
1177+
{
1178+
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-14407.php'], []);
1179+
}
1180+
1181+
#[RequiresPhp('>= 8.1')]
1182+
public function testBug13421(): void
1183+
{
1184+
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-13421.php'], []);
1185+
}
1186+
11751187
}

0 commit comments

Comments
 (0)