| Conditions | 6 |
| Paths | 8 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | 12 | public function jsonSerialize(): array |
|
| 29 | { |
||
| 30 | 12 | $data = []; |
|
| 31 | 12 | if ($this->commands !== []) { |
|
| 32 | 6 | $data['commands'] = $this->commands; |
|
| 33 | } |
||
| 34 | 12 | if ($this->description !== null && $this->description !== '') { |
|
| 35 | 6 | $data['description'] = $this->description; |
|
| 36 | } |
||
| 37 | 12 | if ($this->when !== null && $this->when !== '') { |
|
| 38 | 6 | $data['when'] = $this->when; |
|
| 39 | } |
||
| 40 | |||
| 41 | 12 | return $data; |
|
| 42 | } |
||
| 44 |