Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php namespace Pz\Doctrine\Rest\Fractal; |
||
30 | 12 | public function collection($resourceKey, array $data, $includeAttributes = true) |
|
31 | { |
||
32 | 12 | $resources = []; |
|
33 | |||
34 | 12 | foreach ($data as $resource) { |
|
35 | 12 | $resources[] = $this->item($resourceKey, $resource, $includeAttributes)['data']; |
|
36 | } |
||
37 | |||
38 | 12 | return ['data' => $resources]; |
|
39 | } |
||
58 |