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