Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php namespace Pz\Doctrine\Rest\Fractal; |
||
5 | class JsonApiSerializer extends \League\Fractal\Serializer\JsonApiSerializer |
||
6 | { |
||
7 | /** |
||
8 | * @var RestRequestContract |
||
9 | */ |
||
10 | protected $request; |
||
11 | |||
12 | /** |
||
13 | * JsonApiSerializer constructor. |
||
14 | * |
||
15 | * @param RestRequestContract $request |
||
16 | */ |
||
17 | 18 | public function __construct(RestRequestContract $request) |
|
21 | 18 | } |
|
22 | |||
23 | /** |
||
24 | * @param string $resourceKey |
||
25 | * @param array $data |
||
26 | * @param bool $includeAttributes |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | 12 | public function collection($resourceKey, array $data, $includeAttributes = true) |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $resourceKey |
||
43 | * @param array $data |
||
44 | * @param bool $includeAttributes |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | 17 | public function item($resourceKey, array $data, $includeAttributes = true) |
|
58 |