Bug Report
| Subject |
Details |
| Rector version |
v0.15.25 |
When using the AddMethodCallBasedStrictParamTypeRector rule and checking the index of an array created from array_reverse, rector ends up getting stuck and eventually triggers the timeout.
Minimal PHP Code Causing Issue
https://getrector.com/demo/fe336fa4-194f-4bd3-8922-2780d5141d13
Changing:
$parts = array_reverse(explode('/', '/some/test/url')); to $parts = explode('/', '/some/test/url');
OR removing the lines:
if ($index === 0) {
continue;
}
Allows rector to proceed
Note that the explode is unnecessary to replicate this, and passing a hard coded array to array_reverse has the same issue.
Expected Behaviour
Rector should be able to proceed without causing a timeout.