Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function process(ContainerBuilder $container) |
||
20 | { |
||
21 | if (false === $container->hasAlias(self::FIREWALL_MAPPER_SERVICE) && |
||
22 | false === $container->hasDefinition(self::FIREWALL_MAPPER_SERVICE)) { |
||
23 | return; |
||
24 | } |
||
25 | |||
26 | $map = $container->getDefinition('security.firewall.map'); |
||
27 | $maps = $map->getArgument(1); |
||
28 | |||
29 | $refs = []; |
||
30 | foreach ($maps as $serviceName => $firewall) { |
||
31 | $refs[substr($serviceName, 30)] = $firewall; |
||
32 | } |
||
33 | |||
34 | $firewallManagerDef = $container->getDefinition(self::FIREWALL_MAPPER_SERVICE); |
||
35 | $firewallManagerDef->replaceArgument(0, $refs); |
||
36 | } |
||
38 |