Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 3 | public function process(ContainerBuilder $container) |
|
25 | { |
||
26 | 3 | if (!$container->hasParameter('doyo_user.storage')) { |
|
27 | 1 | return; |
|
28 | } |
||
29 | |||
30 | 2 | $storage = $container->getParameter('doyo_user.storage'); |
|
31 | |||
32 | 2 | if ('custom' === $storage) { |
|
33 | 1 | return; |
|
34 | } |
||
35 | |||
36 | 1 | $validationFile = __DIR__.'/../../Resources/config/storage-validation/'.$storage.'.yaml'; |
|
37 | |||
38 | 1 | $container->getDefinition('validator.builder') |
|
39 | 1 | ->addMethodCall('addYamlMapping', [$validationFile]); |
|
40 | } |
||
42 |