| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 2 | public function make(array $factories): TryFactory |
|
| 22 | { |
||
| 23 | 2 | $map = new Map('string', HeaderFactoryInterface::class); |
|
| 24 | |||
| 25 | 2 | foreach ($factories as $alias => $factory) { |
|
| 26 | 2 | $map = $map->put($alias, $factory); |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | return new TryFactory( |
|
| 30 | 2 | new DelegationFactory($map), |
|
| 31 | 2 | new HeaderFactory |
|
| 32 | ); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |