Skip to content

Commit 0f5de27

Browse files
authored
refactor: followup style variable array (#9319)
1 parent 9bc61b3 commit 0f5de27

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ private function addFilters($routes)
122122
$filtersShortest = $filterCollector->get($route['method'], $routePath . $sampleUri);
123123

124124
// Get common array elements
125-
$filters = [];
126-
$filters['before'] = array_intersect($filtersLongest['before'], $filtersShortest['before']);
127-
$filters['after'] = array_intersect($filtersLongest['after'], $filtersShortest['after']);
125+
$filters = [
126+
'before' => array_intersect($filtersLongest['before'], $filtersShortest['before']),
127+
'after' => array_intersect($filtersLongest['after'], $filtersShortest['after']),
128+
];
128129

129130
$route['before'] = implode(' ', array_map(class_basename(...), $filters['before']));
130131
$route['after'] = implode(' ', array_map(class_basename(...), $filters['after']));

0 commit comments

Comments
 (0)