/** * Inject regex matches into the route matches * * @param RouteMatch|V2RouteMatch $routeMatches * @param array $matches */ protected function injectRouteMatches($routeMatches, array $matches) { foreach ($matches as $key => $value) { if (is_numeric($key) || is_int($key) || $value === '') { continue; } $routeMatches->setParam($key, $value); } }