| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 522 | public function process(ContainerBuilder $container) |
|
| 27 | { |
||
| 28 | 522 | $tag = 'ivory.google_map.helper.renderer.extendable'; |
|
| 29 | 522 | $extendableRenderer = $container->getDefinition('ivory.google_map.helper.renderer.overlay.extendable'); |
|
| 30 | |||
| 31 | 522 | foreach ($container->findTaggedServiceIds($tag) as $id => $attributes) { |
|
| 32 | 522 | foreach ($attributes as $attribute) { |
|
| 33 | 522 | if (!isset($attribute['class'])) { |
|
| 34 | 9 | throw new \RuntimeException(sprintf( |
|
| 35 | 9 | 'No "class" attribute found for the tag "%s" on the service "%s".', |
|
| 36 | 8 | $tag, |
|
| 37 | 1 | $id |
|
| 38 | 7 | )); |
|
| 39 | } |
||
| 40 | |||
| 41 | 513 | $extendableRenderer->addMethodCall('setRenderer', [$attribute['class'], new Reference($id)]); |
|
| 42 | 399 | } |
|
| 43 | 399 | } |
|
| 44 | 513 | } |
|
| 45 | } |
||
| 46 |