From 0f5de2782fc54fed5d23739b1865c4eaf09a08ab Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:54:59 +0700 Subject: [PATCH] refactor: followup style variable array (#9319) --- .../Routes/AutoRouterImproved/AutoRouteCollector.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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']));