| Conditions | 4 |
| Paths | 4 |
| Total Lines | 28 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 39 | private static function gatherMapping() |
||
| 40 | { |
||
| 41 | $map = []; |
||
| 42 | /** @var Package $package */ |
||
| 43 | foreach (packages() as $package) { |
||
| 44 | $config = $package->getConfig('extra'); |
||
| 45 | |||
| 46 | if ($config === null) { |
||
| 47 | continue; |
||
| 48 | } |
||
| 49 | |||
| 50 | $mapping = get_in( |
||
| 51 | $config, |
||
| 52 | [ |
||
| 53 | 'api-clients', |
||
| 54 | 'command-bus' |
||
| 55 | ] |
||
| 56 | ); |
||
| 57 | |||
| 58 | if ($mapping === null) { |
||
| 59 | continue; |
||
| 60 | } |
||
| 61 | |||
| 62 | $map += Mapper::map($package->getPath($mapping['path']), $mapping['namespace']); |
||
| 63 | } |
||
| 64 | |||
| 65 | return $map; |
||
| 66 | } |
||
| 67 | } |
||
| 68 |