Skip to content

Commit

Permalink
refactor: followup style variable array (#9319)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevsr authored Dec 12, 2024
1 parent 9bc61b3 commit 0f5de27
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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']));
Expand Down

0 comments on commit 0f5de27

Please sign in to comment.