Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.5923 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
65 | 12 | public function toArray() |
|
66 | { |
||
67 | 12 | $array = []; |
|
68 | |||
69 | 12 | if (! empty($this->data)) { |
|
70 | 12 | $array['data'] = $this->data->toIdentifier(); |
|
71 | 12 | } |
|
72 | |||
73 | 12 | if (! empty($this->meta)) { |
|
74 | $array['meta'] = $this->meta; |
||
75 | } |
||
76 | |||
77 | 12 | if (! empty($this->links)) { |
|
78 | $array['links'] = $this->links; |
||
79 | } |
||
80 | |||
81 | 12 | return $array; |
|
82 | } |
||
83 | } |
||
84 |