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