Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 | public function __construct(array $patchers = null) |
||
25 | { |
||
26 | $xmlAccessor = new XmlAccessor(); |
||
27 | |||
28 | $this->patchers = $patchers !== null |
||
29 | ? $patchers |
||
30 | : [ |
||
31 | new CodeStylePatcher(), |
||
32 | new FileTemplatesPatcher($xmlAccessor), |
||
33 | new InspectionsPatcher($xmlAccessor) |
||
34 | ]; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Patch the config. |
||
39 | * |
||
40 | * @param EnvironmentInterface $environment |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function patch( |
||
49 | } |
||
50 | } |
||
52 |