| Conditions | 7 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | 5 | public function jsonSerialize(): array |
|
| 25 | { |
||
| 26 | 5 | $data = parent::jsonSerialize(); |
|
| 27 | |||
| 28 | 5 | if ($this->arguments !== null && !empty($this->arguments)) { |
|
| 29 | 3 | $data['arguments'] = $this->arguments; |
|
| 30 | } |
||
| 31 | |||
| 32 | 5 | if ($this->components !== null && !empty($this->components)) { |
|
| 33 | 2 | $data['components'] = $this->components; |
|
| 34 | } |
||
| 35 | |||
| 36 | 5 | if ($this->flags !== null && !empty($this->flags)) { |
|
| 37 | 2 | $data['flags'] = $this->flags; |
|
| 38 | } |
||
| 39 | |||
| 40 | 5 | return $data; |
|
| 41 | } |
||
| 43 |