Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 5.2596 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 1 | public function process(ContainerBuilder $container) |
|
30 | { |
||
31 | 1 | if (!$container->has(self::ROLE_PROVIDER_SERVICE)) { |
|
32 | return; |
||
33 | } |
||
34 | |||
35 | 1 | if (!$container->has('security.token_storage') && $container->has('security.context')) { |
|
36 | $definition = $container->getDefinition(self::ROLE_PROVIDER_SERVICE); |
||
37 | $definition->replaceArgument(0, new Reference('security.context')); |
||
38 | } |
||
39 | 1 | } |
|
40 | } |
||
41 |