| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 31 | public function jsonSerialize(): array |
||
| 32 | { |
||
| 33 | $data = [ |
||
| 34 | 'type' => self::TYPE, |
||
| 35 | 'commands' => $this->commands, |
||
| 36 | ]; |
||
| 37 | |||
| 38 | if ($this->token !== null) { |
||
| 39 | $data['token'] = $this->token; |
||
| 40 | } |
||
| 41 | |||
| 42 | if ($this->presentationUri !== null) { |
||
| 43 | $data['presentationUri'] = $this->presentationUri; |
||
| 44 | } |
||
| 45 | |||
| 46 | return $data; |
||
| 47 | } |
||
| 49 |