| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | 5 | public function jsonSerialize(): array |
|
| 23 | { |
||
| 24 | 5 | $data = parent::jsonSerialize(); |
|
| 25 | |||
| 26 | 5 | if ($this->data !== null && !empty($this->data)) { |
|
| 27 | 2 | $data['data'] = $this->data; |
|
| 28 | } |
||
| 29 | |||
| 30 | 5 | if ($this->commands !== null && !empty($this->commands)) { |
|
| 31 | 2 | $data['commands'] = $this->commands; |
|
| 32 | } |
||
| 33 | |||
| 34 | 5 | return $data; |
|
| 35 | } |
||
| 37 |