Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
15 | 3 | public function process(ContainerBuilder $container) |
|
16 | { |
||
17 | 3 | if (!$container->hasParameter('doyo_user.storage')) { |
|
18 | 1 | return; |
|
19 | } |
||
20 | |||
21 | 2 | $storage = $container->getParameter('doyo_user.storage'); |
|
22 | |||
23 | 2 | if ('custom' === $storage) { |
|
24 | 1 | return; |
|
25 | } |
||
26 | |||
27 | 1 | $validationFile = __DIR__.'/../../Resources/config/storage-validation/'.$storage.'.yaml'; |
|
28 | |||
29 | 1 | $container->getDefinition('validator.builder') |
|
30 | 1 | ->addMethodCall('addYamlMapping', array($validationFile)); |
|
31 | } |
||
32 | } |