-
-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/6837a4d5-c4d2-46e6-a872-3db3777574b7
<?php
class Class2 {
public function sort(array $ids): void
{
$bindings = [];
$statement = '<SQL qeury>';
foreach ($ids as $index => $cID) {
$bindings[] = $cID;
$bindings[] = $index + 1;
}
print($statement);
foreach ($ids as $cID) {
$bindings[] = $cID;
}
}
}Responsible rules
ForeachItemsAssignToEmptyArrayToAssignRector
Expected Behavior
no change
Reactions are currently unavailable