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;
    }