private function getParameters(Contracts\Request $request, $route)
    {
        $path    = $request->path();
        $pattern = $this->pattern($route);
        if (preg_match_all($pattern, $path, $matches, PREG_SET_ORDER) === false) {
            return []; // @codeCoverageIgnore
        }

        unset($matches[0][0]);
        $matches = array_values($matches[0]);

        return $matches;
    }