src/Valkyrja/Annotations/NativeAnnotations.php
public function classAndMembersAnnotations(string $class): array
    {
        $index = static::CLASS_AND_MEMBERS_CACHE . $class;

        if (isset(self::$annotations[$index])) {
            return self::$annotations[$index];
        }

        return self::$annotations[$index] = array_merge(
            $this->classAnnotations($class),
            $this->classMembersAnnotations($class)
        );
    }
public function classAndMembersAnnotations(string $class): array
    {
        $index = static::CLASS_AND_MEMBERS_CACHE . $class;

        if (isset(self::$annotations[$index])) {
            return self::$annotations[$index];
        }

        return self::$annotations[$index] = array_merge(
            $this->classAnnotations($class),
            $this->classMembersAnnotations($class)
        );
    }
Get a class's and class's members' annotations.

@param string $class The class

@throws \ReflectionException

@return \Valkyrja\Annotations\Annotation[]