| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function resolveConstraintPackages(\Composer\Config $composerConfig) |
||
| 13 | { |
||
| 14 | $platformOverrides = array_filter( |
||
| 15 | (array)$composerConfig->get('platform') |
||
| 16 | ); |
||
| 17 | |||
| 18 | if (!empty($platformOverrides)) { |
||
| 19 | $platformOverrides = array(); |
||
| 20 | } |
||
| 21 | |||
| 22 | $platformRepo = new \Composer\Repository\PlatformRepository( |
||
| 23 | array(), |
||
| 24 | $platformOverrides ?: array() |
||
| 25 | ); |
||
| 26 | |||
| 27 | $platformPackages = array(); |
||
| 28 | |||
| 29 | foreach ($platformRepo->getPackages() as $package) { |
||
| 30 | $platformPackages[$package->getName()] = $package; |
||
| 31 | } |
||
| 32 | |||
| 33 | return $platformPackages; |
||
| 34 | } |
||
| 35 | } |