| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | 6 | public function jsonSerialize(): array |
|
| 30 | { |
||
| 31 | 6 | $data = parent::jsonSerialize(); |
|
| 32 | |||
| 33 | 6 | if ($this->componentId !== null) { |
|
| 34 | 5 | $data['componentId'] = $this->componentId; |
|
| 35 | } |
||
| 36 | |||
| 37 | 6 | $data['align'] = $this->align->value; |
|
| 38 | 6 | $data['highlightMode'] = $this->highlightMode->value; |
|
| 39 | |||
| 40 | 6 | if ($this->minimumDwellTime !== null) { |
|
| 41 | 2 | $data['minimumDwellTime'] = $this->minimumDwellTime; |
|
| 42 | } |
||
| 43 | |||
| 44 | 6 | return $data; |
|
| 45 | } |
||
| 47 |