Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | trait AnnotationReaderTrait |
||
14 | { |
||
15 | private $annotationReader; |
||
16 | |||
17 | public function __construct(Reader $annotationReader) |
||
18 | { |
||
19 | $this->annotationReader = $annotationReader; |
||
20 | } |
||
21 | |||
22 | protected function getClassAnnotation(\ReflectionClass $class, string $annotation): ?AnnotationInterface |
||
23 | { |
||
24 | return $this->annotationReader->getClassAnnotation($class, $annotation); |
||
25 | } |
||
26 | |||
27 | protected function getClassAnnotations(\ReflectionClass $class): array |
||
28 | { |
||
29 | return $this->annotationReader->getClassAnnotations($class); |
||
30 | } |
||
31 | |||
32 | protected function getPropertyAnnotation(\ReflectionProperty $property, string $annotation): ?AnnotationInterface |
||
35 | } |
||
36 | } |
||
37 |