Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | trait AnnotationReaderTrait |
||
16 | { |
||
17 | private $annotationReader; |
||
18 | |||
19 | public function __construct(Reader $annotationReader) |
||
20 | { |
||
21 | $this->annotationReader = $annotationReader; |
||
22 | } |
||
23 | |||
24 | protected function getClassAnnotation(\ReflectionClass $class, string $annotation) |
||
25 | { |
||
26 | return $this->annotationReader->getClassAnnotation($class, $annotation); |
||
27 | } |
||
28 | |||
29 | protected function getClassAnnotations(\ReflectionClass $class): array |
||
30 | { |
||
31 | return $this->annotationReader->getClassAnnotations($class); |
||
32 | } |
||
33 | |||
34 | protected function getPropertyAnnotations(\ReflectionProperty $property): array |
||
35 | { |
||
36 | return $this->annotationReader->getPropertyAnnotations($property); |
||
37 | } |
||
38 | |||
39 | protected function getMethodAnnotation(\ReflectionMethod $method, string $annotation) |
||
42 | } |
||
43 | } |
||
44 |