| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class Gradient implements \JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param string[] $colorRange Array of colors for the gradient |
||
| 11 | * @param string $description Description of the gradient |
||
| 12 | * @param BackgroundType $type Type of gradient (linear or radial) |
||
| 13 | * @param float[]|null $inputRange Array of input range values |
||
| 14 | * @param int $angle Angle for linear gradients |
||
| 15 | */ |
||
| 16 | 11 | public function __construct( |
|
| 17 | public array $colorRange, |
||
| 18 | public string $description = '', |
||
| 19 | public BackgroundType $type = BackgroundType::LINEAR, |
||
| 20 | public ?array $inputRange = [], |
||
| 21 | public int $angle = 0, |
||
| 22 | ) { |
||
| 23 | 11 | } |
|
| 24 | |||
| 25 | 7 | public function jsonSerialize(): array |
|
| 39 | } |
||
| 40 | } |
||
| 41 |