| Conditions | 4 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | 6 | public function jsonSerialize(): array |
|
| 22 | { |
||
| 23 | 6 | $data = []; |
|
| 24 | |||
| 25 | 6 | if ($this->id !== null) { |
|
| 26 | 5 | $data['id'] = $this->id; |
|
| 27 | } |
||
| 28 | |||
| 29 | 6 | if ($this->type !== null) { |
|
| 30 | 4 | $data['type'] = $this->type; |
|
| 31 | } |
||
| 32 | |||
| 33 | 6 | if ($this->value !== null) { |
|
| 34 | 4 | $data['value'] = $this->value; |
|
| 35 | } |
||
| 36 | |||
| 37 | 6 | return $data; |
|
| 38 | } |
||
| 40 |