Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function create(PluginConfig $pluginConfig) |
||
25 | { |
||
26 | $composerConfig = $this->composer->getConfig(); |
||
27 | |||
28 | $packageInfoResolver = new \Vaimo\ComposerPatches\Package\InfoResolver( |
||
29 | $this->composer->getInstallationManager(), |
||
30 | $composerConfig->get(\Vaimo\ComposerPatches\Composer\ConfigKeys::VENDOR_DIR) |
||
31 | ); |
||
32 | |||
33 | $infoExtractor = $pluginConfig->shouldPreferOwnerPackageConfig() |
||
34 | ? new ConfigExtractors\VendorConfigExtractor($packageInfoResolver) |
||
35 | : new ConfigExtractors\InstalledConfigExtractor(); |
||
36 | |||
37 | return new \Vaimo\ComposerPatches\Patcher\ConfigReader($infoExtractor); |
||
38 | } |
||
40 |