| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 2 | public function toArray(array $scopes = []) |
|
| 28 | { |
||
| 29 | $collection = [ |
||
| 30 | 2 | 'count' => count($this), |
|
| 31 | 2 | 'total' => $this->getTotal(), |
|
| 32 | 2 | '_embedded' => [] |
|
| 33 | 2 | ]; |
|
| 34 | |||
| 35 | 2 | foreach ($this->getIterator() as $entity) { |
|
| 36 | 2 | $collection['_embedded'][$entity->getDataSource()][] = $entity->toArray($scopes); |
|
| 37 | 1 | } |
|
| 38 | |||
| 39 | 1 | return $collection; |
|
| 40 | } |
||
| 41 | |||
| 118 |