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