Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function getAnnotations(): array |
||
34 | 2 | { |
|
35 | $object = $this->object; |
||
36 | 2 | if (isset($object->classAnnotations) && is_string($object->classAnnotations)) { |
|
|
|||
37 | /** @var list<object> $annotations */ |
||
38 | $annotations = unserialize($object->classAnnotations, ['allowed_classes' => true]); |
||
39 | |||
40 | return $annotations; |
||
41 | } |
||
42 | 2 | ||
43 | /** @var list<object> $annotations */ |
||
44 | 2 | $annotations = ServiceLocator::getReader()->getClassAnnotations(new \ReflectionClass($this->name)); |
|
45 | 2 | ||
46 | 1 | return $annotations; |
|
47 | 1 | } |
|
64 |