Total Complexity | 4 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
9 | final class State |
||
10 | { |
||
11 | private $color; |
||
12 | private $power; |
||
13 | private $label; |
||
14 | |||
15 | /** |
||
16 | * @param HsbkColor $color |
||
17 | * @param int $power |
||
18 | * @param Label $label |
||
19 | * @throws InvalidValueException |
||
20 | */ |
||
21 | 8 | public function __construct(HsbkColor $color, int $power, Label $label) |
|
22 | { |
||
23 | 8 | $this->color = $color; |
|
24 | 8 | $this->power = validate_uint16('Power level', $power); |
|
25 | 6 | $this->label = $label; |
|
26 | } |
||
27 | |||
28 | 1 | public function getColor(): HsbkColor |
|
29 | { |
||
30 | 1 | return $this->color; |
|
31 | } |
||
32 | |||
33 | 1 | public function getPower(): int |
|
36 | } |
||
37 | |||
38 | 1 | public function getLabel(): Label |
|
43 |