| Conditions | 5 | 
| Paths | 12 | 
| Total Lines | 25 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 33 | public function load(\Composer\Package\PackageInterface $package, $source) | ||
| 34 |     { | ||
| 35 |         if (!is_array($source)) { | ||
| 36 | $source = array($source); | ||
| 37 | } | ||
| 38 | |||
| 39 | $basePath = getcwd(); | ||
| 40 | |||
| 41 |         if (!$package instanceof \Composer\Package\RootPackageInterface) { | ||
| 42 | $basePath = $this->installationManager->getInstallPath($package); | ||
| 43 | } | ||
| 44 | |||
| 45 | $groups = array(); | ||
| 46 | |||
| 47 |         foreach ($source as $item) { | ||
| 48 | $fileContents = $this->configLoader->readToArray($basePath . DIRECTORY_SEPARATOR . $item); | ||
| 49 | |||
| 50 |             if (isset($fileContents[PluginConfig::DEFINITIONS_LIST])) { | ||
| 51 | $fileContents = $fileContents[PluginConfig::DEFINITIONS_LIST]; | ||
| 52 | } | ||
| 53 | |||
| 54 | $groups[] = $fileContents; | ||
| 55 | } | ||
| 56 | |||
| 57 | return $groups; | ||
| 58 | } | ||
| 60 |