src/Valkyrja/Routing/RouteCollection.php
public function dynamicRoute(string $method, string $regex): ? Route
    {
        return $this->route($this->dynamicRoutes[$method][$regex] ?? $regex);
    }
public function dynamicRoute(string $method, string $regex): ? Route
    {
        return $this->route($this->dynamicRoutes[$method][$regex] ?? $regex);
    }
Get a dynamic route.

@param string $method The request method
@param string $regex  The regex

@return null|Route
The route if found or null when no static route is
found for the path and method combination specified