| Conditions | 4 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 38 | public function fetchComponentObjects(SimpleAnnotationReader $annotationReader) : array |
||
| 39 | { |
||
| 40 | $fields = $this->getFields(); |
||
| 41 | $objects = []; |
||
| 42 | |||
| 43 | array_walk_recursive($fields, function ($value) use ($annotationReader, &$objects) { |
||
| 44 | if ($value instanceof AbstractAnnotation) { |
||
| 45 | $objects = array_merge($objects, $value->fetchComponentObjects($annotationReader)); |
||
| 46 | } elseif ($value instanceof AbstractReference) { |
||
| 47 | $object = $value->getAnnotation($annotationReader); |
||
| 48 | $objects[] = $object; |
||
| 49 | |||
| 50 | if ($object instanceof AbstractAnnotation) { |
||
| 51 | $objects = array_merge($objects, $object->fetchComponentObjects($annotationReader)); |
||
| 52 | } |
||
| 53 | } |
||
| 54 | }); |
||
| 55 | |||
| 56 | return $objects; |
||
| 57 | } |
||
| 59 |