Conditions | 4 |
Paths | 8 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
23 | 33 | public function toArray(): array |
|
24 | { |
||
25 | 33 | $resource = []; |
|
26 | |||
27 | 33 | $resource[Members::DATA] = ($this->data === null) ? null : $this->data->toArray(); |
|
28 | |||
29 | 33 | if (isset($this->meta)) { |
|
30 | 18 | $resource[Members::META] = $this->meta; |
|
31 | } |
||
32 | 33 | if (isset($this->links)) { |
|
33 | 18 | $resource[Members::LINKS] = $this->links; |
|
34 | } |
||
35 | |||
36 | 33 | return $resource; |
|
37 | } |
||
61 |