@@ -45,85 +45,36 @@ private function findReader(ReflectionClass $class): Reader
4545 throw new Exception ('graphql-doctrine requires ' . $ className . ' entity to be configured with a ` ' . AnnotationDriver::class . '`. ' );
4646 }
4747
48- /**
49- * Gets the annotations applied to a class.
50- *
51- * @param ReflectionClass $class the ReflectionClass of the class from which
52- * the class annotations should be read
53- *
54- * @return array an array of Annotations
55- */
5648 public function getClassAnnotations (ReflectionClass $ class )
5749 {
5850 return $ this ->findReader ($ class )
5951 ->getClassAnnotations ($ class );
6052 }
6153
62- /**
63- * Gets a class annotation.
64- *
65- * @param ReflectionClass $class the ReflectionClass of the class from which
66- * the class annotations should be read
67- * @param string $annotationName the name of the annotation
68- *
69- * @return null|object the Annotation or NULL, if the requested annotation does not exist
70- */
7154 public function getClassAnnotation (ReflectionClass $ class , $ annotationName )
7255 {
7356 return $ this ->findReader ($ class )
7457 ->getClassAnnotation ($ class , $ annotationName );
7558 }
7659
77- /**
78- * Gets the annotations applied to a method.
79- *
80- * @param ReflectionMethod $method the ReflectionMethod of the method from which
81- * the annotations should be read
82- *
83- * @return array an array of Annotations
84- */
8560 public function getMethodAnnotations (ReflectionMethod $ method )
8661 {
8762 return $ this ->findReader ($ method ->getDeclaringClass ())
8863 ->getMethodAnnotations ($ method );
8964 }
9065
91- /**
92- * Gets a method annotation.
93- *
94- * @param ReflectionMethod $method the ReflectionMethod to read the annotations from
95- * @param string $annotationName the name of the annotation
96- *
97- * @return null|object the Annotation or NULL, if the requested annotation does not exist
98- */
9966 public function getMethodAnnotation (ReflectionMethod $ method , $ annotationName )
10067 {
10168 return $ this ->findReader ($ method ->getDeclaringClass ())
10269 ->getMethodAnnotation ($ method , $ annotationName );
10370 }
10471
105- /**
106- * Gets the annotations applied to a property.
107- *
108- * @param ReflectionProperty $property the ReflectionProperty of the property
109- * from which the annotations should be read
110- *
111- * @return array an array of Annotations
112- */
11372 public function getPropertyAnnotations (ReflectionProperty $ property )
11473 {
11574 return $ this ->findReader ($ property ->getDeclaringClass ())
11675 ->getPropertyAnnotations ($ property );
11776 }
11877
119- /**
120- * Gets a property annotation.
121- *
122- * @param ReflectionProperty $property the ReflectionProperty to read the annotations from
123- * @param string $annotationName the name of the annotation
124- *
125- * @return null|object the Annotation or NULL, if the requested annotation does not exist
126- */
12778 public function getPropertyAnnotation (ReflectionProperty $ property , $ annotationName )
12879 {
12980 return $ this ->findReader ($ property ->getDeclaringClass ())
0 commit comments