| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 25 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 19 | public function process(ContainerBuilder $container) | ||
| 20 |     { | ||
| 21 |         if (!$container->has('gbprod.doctrine_specification_handler')) { | ||
| 22 |             throw new \Exception('Missing gbprod.doctrine_specification_handler definition'); | ||
| 23 | } | ||
| 24 | |||
| 25 | $handler = $container | ||
| 26 |             ->findDefinition('gbprod.doctrine_specification_handler') | ||
| 27 | ; | ||
| 28 | |||
| 29 |         $builders = $container->findTaggedServiceIds('doctrine.expression_builder'); | ||
| 30 | |||
| 31 |         foreach ($builders as $id => $tags) { | ||
| 32 |             foreach ($tags as $attributes) { | ||
| 33 |                 if (!isset($attributes['specification'])) { | ||
| 34 |                     throw new \Exception('The doctrine.expression_builder tag must always have a "specification" attribute'); | ||
| 35 | } | ||
| 36 | |||
| 37 | $handler->addMethodCall( | ||
| 38 | 'registerBuilder', | ||
| 39 | [$attributes['specification'], new Reference($id)] | ||
| 40 | ); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } |