src/Valkyrja/Routing/NativeRouter.php
protected function setupAnnotatedRoutes(): void
    {
        /** @var RouteAnnotations $routeAnnotations */
        $routeAnnotations = $this->app->container()->getSingleton(
            RouteAnnotations::class
        );

        // Get all the annotated routes from the list of controllers
        $routes = $routeAnnotations->getRoutes(
            ...$this->app->config()['routing']['controllers']
        );

        // Iterate through the routes
        foreach ($routes as $route) {
            // Set the route
            $this->addRoute($route);
        }
    }
protected function setupAnnotatedRoutes(): void
    {
        /** @var RouteAnnotations $routeAnnotations */
        $routeAnnotations = $this->app->container()->getSingleton(
            RouteAnnotations::class
        );

        // Get all the annotated routes from the list of controllers
        $routes = $routeAnnotations->getRoutes(
            ...$this->app->config()['routing']['controllers']
        );

        // Iterate through the routes
        foreach ($routes as $route) {
            // Set the route
            $this->addRoute($route);
        }
    }
Setup annotated routes.

@throws \InvalidArgumentException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidClosureException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidDispatchCapabilityException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidFunctionException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidMethodException
@throws \Valkyrja\Dispatcher\Exceptions\InvalidPropertyException

@return void