@@ -1323,6 +1323,26 @@ public function testBug5919(): void
13231323 $ this ->analyse ([__DIR__ . '/data/bug-5919.php ' ], []);
13241324 }
13251325
1326+ public function testBug8430 (): void
1327+ {
1328+ $ this ->cliArgumentsVariablesRegistered = true ;
1329+ $ this ->polluteScopeWithLoopInitialAssignments = false ;
1330+ $ this ->checkMaybeUndefinedVariables = true ;
1331+ $ this ->polluteScopeWithAlwaysIterableForeach = true ;
1332+
1333+ $ this ->analyse ([__DIR__ . '/data/bug-8430.php ' ], []);
1334+ }
1335+
1336+ public function testBug8430b (): void
1337+ {
1338+ $ this ->cliArgumentsVariablesRegistered = true ;
1339+ $ this ->polluteScopeWithLoopInitialAssignments = false ;
1340+ $ this ->checkMaybeUndefinedVariables = true ;
1341+ $ this ->polluteScopeWithAlwaysIterableForeach = true ;
1342+
1343+ $ this ->analyse ([__DIR__ . '/data/bug-8430b.php ' ], []);
1344+ }
1345+
13261346 public function testBug5477 (): void
13271347 {
13281348 $ this ->cliArgumentsVariablesRegistered = true ;
@@ -1333,4 +1353,51 @@ public function testBug5477(): void
13331353 $ this ->analyse ([__DIR__ . '/data/bug-5477.php ' ], []);
13341354 }
13351355
1356+ public function testBug10657 (): void
1357+ {
1358+ $ this ->cliArgumentsVariablesRegistered = true ;
1359+ $ this ->polluteScopeWithLoopInitialAssignments = false ;
1360+ $ this ->checkMaybeUndefinedVariables = true ;
1361+ $ this ->polluteScopeWithAlwaysIterableForeach = true ;
1362+
1363+ $ this ->analyse ([__DIR__ . '/data/bug-10657.php ' ], []);
1364+ }
1365+
1366+ public function testBug6830 (): void
1367+ {
1368+ $ this ->cliArgumentsVariablesRegistered = true ;
1369+ $ this ->polluteScopeWithLoopInitialAssignments = false ;
1370+ $ this ->checkMaybeUndefinedVariables = true ;
1371+ $ this ->polluteScopeWithAlwaysIterableForeach = true ;
1372+
1373+ $ this ->analyse ([__DIR__ . '/data/bug-6830.php ' ], []);
1374+ }
1375+
1376+ public function testBug14117 (): void
1377+ {
1378+ $ this ->cliArgumentsVariablesRegistered = true ;
1379+ $ this ->polluteScopeWithLoopInitialAssignments = false ;
1380+ $ this ->checkMaybeUndefinedVariables = true ;
1381+ $ this ->polluteScopeWithAlwaysIterableForeach = true ;
1382+
1383+ $ this ->analyse ([__DIR__ . '/data/bug-14117.php ' ], [
1384+ [
1385+ 'Variable $value might not be defined. ' ,
1386+ 33 ,
1387+ ],
1388+ [
1389+ 'Variable $value might not be defined. ' ,
1390+ 49 ,
1391+ ],
1392+ [
1393+ 'Undefined variable: $value ' ,
1394+ 65 ,
1395+ ],
1396+ [
1397+ 'Undefined variable: $value ' ,
1398+ 81 ,
1399+ ],
1400+ ]);
1401+ }
1402+
13361403}
0 commit comments