public function functionAnnotations(string $function): array
    {
        $index = static::FUNCTION_CACHE . $function;

        return self::$annotations[$index]
            ?? self::$annotations[$index] = $this->setAnnotationValues(
                [
                    'function' => $function,
                ],
                ...$this->getReflectionFunctionAnnotations(
                $this->getFunctionReflection($function)
            )
            );
    }
public function functionAnnotations(string $function): array
    {
        $index = static::FUNCTION_CACHE . $function;

        return self::$annotations[$index]
            ?? self::$annotations[$index] = $this->setAnnotationValues(
                [
                    'function' => $function,
                ],
                ...$this->getReflectionFunctionAnnotations(
                $this->getFunctionReflection($function)
            )
            );
    }
public function functionAnnotations ( string $ function ) : array { $ index = static :: FUNCTION_CACHE . $ function ; return self :: $ annotations [ $ index ] ?? self :: $ annotations [ $ index ] = $ this -> setAnnotationValues ( [ 'function' => $ function , ] , ... $ this -> getReflectionFunctionAnnotations ( $ this -> getFunctionReflection ( $ function ) ) ) ; }
Get a function's annotations.

@param string $function The function

@throws \ReflectionException

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