public function classAnnotations(string $class): array
    {
        $index = static::CLASS_CACHE . $class;

        return self::$annotations[$index]
            ?? self::$annotations[$index] = $this->setAnnotationValues(
                [
                    'class' => $class,
                ],
                ...$this->parser->getAnnotations(
                $this->getClassReflection($class)->getDocComment()
            )
            );
    }
public function classAnnotations(string $class): array
    {
        $index = static::CLASS_CACHE . $class;

        return self::$annotations[$index]
            ?? self::$annotations[$index] = $this->setAnnotationValues(
                [
                    'class' => $class,
                ],
                ...$this->parser->getAnnotations(
                $this->getClassReflection($class)->getDocComment()
            )
            );
    }
public function classAnnotations ( string $ class ) : array { $ index = static :: CLASS_CACHE . $ class ; return self :: $ annotations [ $ index ] ?? self :: $ annotations [ $ index ] = $ this -> setAnnotationValues ( [ 'class' => $ class , ] , ... $ this -> parser -> getAnnotations ( $ this -> getClassReflection ( $ class ) -> getDocComment ( ) ) ) ; }
Get a class's annotations.

@param string $class The class

@throws \ReflectionException

@return \Valkyrja\Annotations\Annotation[]
Get a class s annotations .