src/Router/Router.php
public function match(ServerRequestInterface $request): ?Route
    {
        $result = $this->router->match($request);

        if ($result->isSuccess()) {
            return new Route(
                $result->getMatchedRoute()->getPath(),
                $result->getMatchedRoute()->getMiddleware(),
                $result->getMatchedRoute()->getAllowedMethods(),
                $result->getMatchedRouteName(),
                $result->getMatchedParams()
            );
        }

        return null;
    }
public function match(ServerRequestInterface $request): ?Route
    {
        $result = $this->router->match($request);

        if ($result->isSuccess()) {
            return new Route(
                $result->getMatchedRoute()->getPath(),
                $result->getMatchedRoute()->getMiddleware(),
                $result->getMatchedRoute()->getAllowedMethods(),
                $result->getMatchedRouteName(),
                $result->getMatchedParams()
            );
        }

        return null;
    }
@param ServerRequestInterface $request

@return Route|null