Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 61.53% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
12 | class ConfigPatcher implements ConfigPatcherInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var ConfigPatcherInterface[] |
||
16 | */ |
||
17 | private $patchers; |
||
18 | |||
19 | /** |
||
20 | * Constructor. |
||
21 | * |
||
22 | * @param array $patchers |
||
23 | */ |
||
24 | 1 | public function __construct(array $patchers = null) |
|
25 | { |
||
26 | 1 | $xmlAccessor = new XmlAccessor(); |
|
27 | |||
28 | 1 | $this->patchers = $patchers !== null |
|
29 | 1 | ? $patchers |
|
30 | : [ |
||
31 | new CodeStylePatcher(), |
||
32 | new FileTemplatesPatcher($xmlAccessor), |
||
33 | new InspectionsPatcher($xmlAccessor), |
||
34 | new TemplateSettingsPatcher($xmlAccessor), |
||
35 | new LiveTemplatesPatcher() |
||
36 | ]; |
||
37 | 1 | } |
|
38 | |||
39 | /** |
||
40 | * Patch the config. |
||
41 | * |
||
42 | * @param EnvironmentInterface $environment |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | 1 | public function patch( |
|
51 | } |
||
52 | 1 | } |
|
54 |