Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | abstract class Annotation implements \Stringable |
||
26 | { |
||
27 | /** @var iterable<object> */ |
||
28 | private $annotations = []; |
||
29 | |||
30 | /** @var \ReflectionClass|\ReflectionClassConstant|\ReflectionProperty|\ReflectionFunctionAbstract|\ReflectionParameter */ |
||
31 | protected $reflection; |
||
32 | |||
33 | /** |
||
34 | * @param iterable<object> $annotations |
||
35 | */ |
||
36 | 7 | public function __construct(iterable $annotations) |
|
37 | { |
||
38 | 7 | $this->annotations = $annotations; |
|
39 | 7 | } |
|
40 | |||
41 | abstract public function getReflection(): \Reflector; |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 3 | public function __toString(): string |
|
47 | { |
||
48 | 3 | return $this->reflection->getName(); |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return iterable<object> |
||
53 | */ |
||
54 | 7 | public function getAnnotation(): iterable |
|
57 | } |
||
58 | } |
||
59 |