Conditions | 5 |
Paths | 8 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
51 | 3 | public function jsonSerialize() |
|
52 | { |
||
53 | 3 | $data = []; |
|
54 | 3 | if ($this->authority) { |
|
55 | 3 | $data['authority'] = $this->authority; |
|
56 | } |
||
57 | 3 | if ($this->status) { |
|
58 | 3 | $data['status'] = $this->status; |
|
59 | } |
||
60 | 3 | if (!empty($this->values)) { |
|
61 | 3 | $data['values'] = []; |
|
62 | 3 | foreach ($this->values as $value) { |
|
63 | 3 | $data['values'][] = [ |
|
64 | 3 | 'value' => $value, |
|
65 | 3 | ]; |
|
66 | } |
||
67 | } |
||
68 | |||
69 | 3 | return $data; |
|
70 | } |
||
72 |