| Conditions | 4 |
| Paths | 4 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 23 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function process(ContainerBuilder $container) |
||
| 28 | { |
||
| 29 | if (!$container->hasDefinition('jb_fileuploader.validator_chain')) { |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | $definition = $container->getDefinition( |
||
| 34 | 'jb_fileuploader.validator_chain' |
||
| 35 | ); |
||
| 36 | |||
| 37 | $taggedServices = $container->findTaggedServiceIds( |
||
| 38 | 'jb_fileuploader.validator' |
||
| 39 | ); |
||
| 40 | |||
| 41 | foreach ($taggedServices as $id => $tags) { |
||
| 42 | foreach ($tags as $attributes) { |
||
| 43 | $definition->addMethodCall( |
||
| 44 | 'addValidator', |
||
| 45 | array(new Reference($id), $attributes["alias"]) |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 |