diff --git a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php index afd231d59999..f6a4f371858a 100644 --- a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php +++ b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php @@ -122,9 +122,10 @@ private function addFilters($routes) $filtersShortest = $filterCollector->get($route['method'], $routePath . $sampleUri); // Get common array elements - $filters = []; - $filters['before'] = array_intersect($filtersLongest['before'], $filtersShortest['before']); - $filters['after'] = array_intersect($filtersLongest['after'], $filtersShortest['after']); + $filters = [ + 'before' => array_intersect($filtersLongest['before'], $filtersShortest['before']), + 'after' => array_intersect($filtersLongest['after'], $filtersShortest['after']), + ]; $route['before'] = implode(' ', array_map(class_basename(...), $filters['before'])); $route['after'] = implode(' ', array_map(class_basename(...), $filters['after']));