public function addUriWildcards($uri, $reflection, $method): string
    {
        $refAction = $reflection->getReflectionClass()->getMethod($method);

        $parameter = '';
        $patterns = $this->router->getPattern();
        $arguments = new \CachingIterator(new \ArrayIterator($refAction->getParameters()));

        foreach ($arguments as $key => $param) {
            if (!$param->isOptional()) {
                if (array_key_exists('{:' . $param->getName() . '}', $patterns)) {
                    $slash = ($arguments->hasNext()) ? '/' : '';
                    $parameter .= '{:' . $param->getName() . '}' . $slash;
                }
            }
        }

        return $uri . '/' . $parameter;
    }