| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 21 |
| Ratio | 100 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 48 | public function process(ContainerBuilder $container) |
|
| 19 | { |
||
| 20 | 48 | $ids = $container->findTaggedServiceIds( |
|
| 21 | 48 | 'innmind_rest_server.http_header_factory' |
|
| 22 | ); |
||
| 23 | 48 | $factories = []; |
|
| 24 | |||
| 25 | 48 | foreach ($ids as $id => $tags) { |
|
| 26 | 48 | foreach ($tags as $tag => $attributes) { |
|
| 27 | 48 | if (!isset($attributes['alias'])) { |
|
| 28 | 2 | throw new MissingAlias; |
|
| 29 | } |
||
| 30 | |||
| 31 | 48 | $factories[$attributes['alias']] = new Reference($id); |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | $container |
||
| 36 | 46 | ->getDefinition('innmind_rest_server.http.factory.header.default') |
|
| 37 | 46 | ->addArgument($factories); |
|
| 38 | 46 | } |
|
| 39 | } |
||
| 40 |