| Conditions | 3 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 2 | public function toArray() |
|
| 39 | { |
||
| 40 | 2 | return $this->attributes |
|
| 41 | 2 | ->mapWithKeys(function ($item, $key) { |
|
| 42 | 2 | return $item instanceof Collection || get_parent_class($item) === BaseEntry::class? |
|
| 43 | 1 | [$key => $item->toArray()] : |
|
| 44 | 2 | [$key => $item]; |
|
| 45 | 2 | }) |
|
| 46 | 2 | ->toArray(); |
|
| 47 | } |
||
| 48 | |||
| 55 | } |