| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function process(ContainerBuilder $container) |
||
| 12 | { |
||
| 13 | foreach ($container->findTaggedServiceIds('swm.mailhook') as $id => $tag) { |
||
| 14 | $tag = array_pop($tag); |
||
| 15 | |||
| 16 | if (!isset($tag['alias'])) { |
||
| 17 | throw new \Exception('You should define an alias for all "swm.mailhook" tagged services'); |
||
| 18 | } |
||
| 19 | |||
| 20 | $container->getDefinition('swm.mail_hook.provider.api_service') |
||
| 21 | ->addMethodCall('setApiService', array($tag['alias'], $container->getDefinition($id))); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | } |