| Conditions | 4 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function toArray(): array |
||
| 28 | { |
||
| 29 | $props = $this->getProperties(); |
||
|
|
|||
| 30 | foreach ($props as $key => $value) { |
||
| 31 | if ($value instanceof Model) { |
||
| 32 | $props[$key] = $value->toArray(); |
||
| 33 | } |
||
| 34 | if ($value instanceof Collection) { |
||
| 35 | $props[$key] = $value->toArray(); |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | return $props; |
||
| 40 | } |
||
| 47 |