| Conditions | 5 |
| Paths | 16 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | 6 | public function jsonSerialize(): array |
|
| 26 | { |
||
| 27 | 6 | $data = []; |
|
| 28 | |||
| 29 | 6 | if ($this->parameters !== null) { |
|
| 30 | 2 | $data['parameters'] = $this->parameters; |
|
| 31 | } |
||
| 32 | |||
| 33 | 6 | if ($this->command !== null) { |
|
| 34 | 2 | $data['command'] = $this->command; |
|
| 35 | } |
||
| 36 | |||
| 37 | 6 | if ($this->commands !== null) { |
|
| 38 | 2 | $data['commands'] = $this->commands; |
|
| 39 | } |
||
| 40 | |||
| 41 | 6 | if ($this->description !== null) { |
|
| 42 | 3 | $data['description'] = $this->description; |
|
| 43 | } |
||
| 44 | |||
| 45 | 6 | return $data; |
|
| 46 | } |
||
| 48 |