| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | 7 | public function jsonSerialize(): array |
|
| 26 | { |
||
| 27 | 7 | $data = [ |
|
| 28 | 7 | 'description' => $this->description, |
|
| 29 | 7 | 'colorRange' => $this->colorRange, |
|
| 30 | 7 | 'angle' => $this->angle, |
|
| 31 | 7 | 'type' => $this->type, |
|
| 32 | 7 | ]; |
|
| 33 | |||
| 34 | 7 | if ($this->inputRange !== null && count($this->inputRange) > 0) { |
|
| 35 | 3 | $data['inputRange'] = $this->inputRange; |
|
| 36 | } |
||
| 37 | |||
| 38 | 7 | return $data; |
|
| 39 | } |
||
| 41 |