protected function getAnnotations(Reflector $reflector): array
    {
        switch (true) {
            case ($reflector instanceof ReflectionClass):
                return $this->annotationReader->getClassAnnotations($reflector);

            case ($reflector instanceof ReflectionMethod):
                return $this->annotationReader->getMethodAnnotations($reflector);

            case ($reflector instanceof ReflectionProperty):
                return $this->annotationReader->getPropertyAnnotations($reflector);

            default:
                throw new InvalidArgumentException('Unsupported reflection point ' . get_class($reflector));
        }
    }
protected function getAnnotations(Reflector $reflector): array
    {
        switch (true) {
            case ($reflector instanceof ReflectionClass):
                return $this->annotationReader->getClassAnnotations($reflector);

            case ($reflector instanceof ReflectionMethod):
                return $this->annotationReader->getMethodAnnotations($reflector);

            case ($reflector instanceof ReflectionProperty):
                return $this->annotationReader->getPropertyAnnotations($reflector);

            default:
                throw new InvalidArgumentException('Unsupported reflection point ' . get_class($reflector));
        }
    }
protected function getAnnotations ( Reflector $ reflector ) : array { switch ( true ) { case ( $ reflector instanceof ReflectionClass ) : return $ this -> annotationReader -> getClassAnnotations ( $ reflector ) ; case ( $ reflector instanceof ReflectionMethod ) : return $ this -> annotationReader -> getMethodAnnotations ( $ reflector ) ; case ( $ reflector instanceof ReflectionProperty ) : return $ this -> annotationReader -> getPropertyAnnotations ( $ reflector ) ; default : throw new InvalidArgumentException ( 'Unsupported reflection point ' . get_class ( $ reflector ) ) ; } }
Return list of annotations for reflection point

@return array list of annotations
@throws \InvalidArgumentException if $reflector is unsupported
Return list of annotations for reflection point