Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 71.43% |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
10 | final class Feature implements IFeature |
||
11 | { |
||
12 | private string $id; |
||
13 | private ToggleStrategies $strategies; |
||
14 | private bool $enabled; |
||
15 | |||
16 | 2 | public function __construct( |
|
17 | string $id, |
||
18 | ToggleStrategies $strategies, |
||
19 | bool $enabled |
||
20 | ) { |
||
21 | 2 | $this->id = $id; |
|
22 | 2 | $this->strategies = $strategies; |
|
23 | 2 | $this->enabled = $enabled; |
|
24 | } |
||
25 | |||
26 | 2 | public function id(): string |
|
27 | { |
||
28 | 2 | return $this->id; |
|
29 | } |
||
30 | |||
31 | 2 | public function strategies(): ToggleStrategies |
|
32 | { |
||
33 | 2 | return $this->strategies; |
|
34 | } |
||
35 | |||
36 | 2 | public function isEnabled(): bool |
|
39 | } |
||
40 | |||
41 | public function jsonSerialize(): array |
||
42 | { |
||
50 |