Add $keysCount & minor CS fix
This commit is contained in:
parent
91f4097a09
commit
5a986bfc27
@ -75,6 +75,7 @@ EOF;
|
||||
|
||||
$routeIterator = $routes->getIterator();
|
||||
$keys = array_keys($routeIterator->getArrayCopy());
|
||||
$keysCount = count($keys);
|
||||
|
||||
$i = 0;
|
||||
|
||||
@ -86,8 +87,10 @@ EOF;
|
||||
$optimizable = $prefix && count($route->all()) > 1 && false === strpos($route->getPrefix(), '{');
|
||||
$indent = '';
|
||||
if ($optimizable) {
|
||||
for ($j = $i; $j < count($keys); $j++) {
|
||||
if ($keys[$j] === null) continue;
|
||||
for ($j = $i; $j < $keysCount; $j++) {
|
||||
if ($keys[$j] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$testRoute = $routeIterator->offsetGet($keys[$j]);
|
||||
$isCollection = ($testRoute instanceof RouteCollection);
|
||||
|
Reference in New Issue
Block a user