Conditions | 3 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | public function toArray(): array |
||
10 | { |
||
11 | return array_map( |
||
12 | function ($entity) |
||
13 | { |
||
14 | if ($entity instanceof GenericLazy) { |
||
15 | $entity = $entity->get($this); |
||
16 | } |
||
17 | |||
18 | if ($entity instanceof ToArrayInterface) { |
||
19 | return $entity->toArray(); |
||
20 | } |
||
21 | |||
22 | return $entity; |
||
23 | }, |
||
24 | $this->data |
||
25 | ); |
||
28 |