| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 30 | public function process(ContainerBuilder $container) |
||
| 31 | { |
||
| 32 | if (!$container->hasDefinition(self::INCIDENT_SIREN)) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | $sirenDefinition = $container->getDefinition( |
||
| 37 | self::INCIDENT_SIREN |
||
| 38 | ); |
||
| 39 | |||
| 40 | $taggedServices = $container->findTaggedServiceIds( |
||
| 41 | self::INCIDENT_SIREN_NOTIFICATION |
||
| 42 | ); |
||
| 43 | |||
| 44 | foreach ($taggedServices as $id => $tags) { |
||
| 45 | $sirenDefinition->addMethodCall( |
||
| 46 | 'add', |
||
| 47 | [new Reference($id)] |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |