Skip to content

Commit

Permalink
refactor: followup style variable array
Browse files Browse the repository at this point in the history
  • Loading branch information
ddevsr committed Dec 12, 2024
1 parent 9bc61b3 commit c2cf707
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 c2cf707

Please sign in to comment.