protected function retrieve(array $routes, $uri)
    {
        $routes = array_values(array_filter($routes));

        if (empty($routes)) {
            $message = 'Route "' . $uri . '" not found';

            throw new \UnexpectedValueException($message);
        }

        $route = current($routes);

        $route[1] = (count($route[1]) > 0) ? array_combine($route[3], $route[1]) : $route[1];

        return $route;
    }