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