src/Valkyrja/Routing/Annotations/NativeRouteAnnotations.php
protected function getClassRoutes(array $classes): array
    {
        /** @var \Valkyrja\Routing\Route[] $routes */
        $routes = [];

        // Iterate through all the classes
        foreach ($classes as $class) {
            $annotations = $this->classMembersAnnotationsType(
                $this->routeAnnotationType,
                $class
            );

            // Get all the routes for each class and iterate through them
            foreach ($annotations as $annotation) {
                // Set the annotation in the routes list
                $routes[] = $annotation;
            }
        }

        return $routes;
    }
protected function getClassRoutes(array $classes): array
    {
        /** @var \Valkyrja\Routing\Route[] $routes */
        $routes = [];

        // Iterate through all the classes
        foreach ($classes as $class) {
            $annotations = $this->classMembersAnnotationsType(
                $this->routeAnnotationType,
                $class
            );

            // Get all the routes for each class and iterate through them
            foreach ($annotations as $annotation) {
                // Set the annotation in the routes list
                $routes[] = $annotation;
            }
        }

        return $routes;
    }
Get all classes' routes.

@param array $classes The classes

@throws \ReflectionException

@return \Valkyrja\Routing\Route[]