From c2cf707b284b89c47d49dbd3eb80c5fde48b252a Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean Date: Thu, 12 Dec 2024 18:02:59 +0700 Subject: [PATCH] refactor: followup style variable array --- .../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']));