We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c2216d commit 364f90dCopy full SHA for 364f90d
1 file changed
tests/PHPStan/Rules/Variables/DefinedVariableRuleTest.php
@@ -1430,4 +1430,19 @@ public function testBug14117(): void
1430
]);
1431
}
1432
1433
+ public function testBug6799c(): void
1434
+ {
1435
+ $this->cliArgumentsVariablesRegistered = true;
1436
+ $this->polluteScopeWithLoopInitialAssignments = false;
1437
+ $this->checkMaybeUndefinedVariables = true;
1438
+ $this->polluteScopeWithAlwaysIterableForeach = true;
1439
+
1440
+ $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-6799c.php'], [
1441
+ [
1442
+ 'Variable $x might not be defined.',
1443
+ 9
1444
+ ]
1445
+ ]);
1446
+ }
1447
1448
0 commit comments