| Conditions | 6 |
| Paths | 9 |
| Total Lines | 24 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function process(ContainerBuilder $container) |
||
| 20 | { |
||
| 21 | if ($container->hasDefinition('run_open_code.exchange_rate.registry.processors')) { |
||
| 22 | |||
| 23 | $definition = $container->getDefinition('run_open_code.exchange_rate.registry.processors'); |
||
| 24 | |||
| 25 | $processors = array(); |
||
| 26 | |||
| 27 | foreach ($container->findTaggedServiceIds('run_open_code.exchange_rate.processor') as $id => $tags) { |
||
| 28 | |||
| 29 | foreach ($tags as $attributes) { |
||
| 30 | $processors[$id] = !empty($attributes['priority']) ? (int)$attributes['priority'] : 0; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | asort($processors); |
||
| 35 | |||
| 36 | foreach ($processors as $id => $processor) { |
||
| 37 | $definition->addMethodCall('add', array( |
||
| 38 | new Reference($id) |
||
| 39 | )); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |