Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class ConfigurationStep |
||
8 | { |
||
9 | /** @var array */ |
||
10 | private $children; |
||
11 | |||
12 | /** @var array */ |
||
13 | private $options; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $service; |
||
17 | |||
18 | /** @var bool */ |
||
19 | private $enabled; |
||
20 | |||
21 | 10 | private function __construct(string $service, array $options, array $children, bool $enabled = true) |
|
22 | { |
||
23 | 10 | $this->service = $service; |
|
24 | 10 | $this->options = $options; |
|
25 | 10 | $this->children = array_map([ConfigurationStep::class, 'create'], $children); |
|
26 | 10 | $this->enabled = $enabled; |
|
27 | 10 | } |
|
28 | |||
29 | 10 | public static function create(array $config) |
|
32 | } |
||
33 | |||
34 | 8 | public function getOptions(): array |
|
35 | { |
||
36 | 8 | return $this->options; |
|
37 | } |
||
38 | |||
39 | 8 | public function getService(): string |
|
40 | { |
||
41 | 8 | return $this->service; |
|
42 | } |
||
43 | |||
44 | 5 | public function getChildren(): array |
|
47 | } |
||
48 | |||
49 | 8 | public function isEnabled() |
|
54 |