Conditions | 4 |
Paths | 5 |
Total Lines | 24 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function process(ContainerBuilder $container) |
||
16 | { |
||
17 | if (!$container->hasDefinition('bgy_oauth2_server.authorization_server')) { |
||
18 | |||
19 | return; |
||
20 | } |
||
21 | |||
22 | $taggedServices = $container->findTaggedServiceIds('bgy_oauth2_server.grant_type_extension'); |
||
23 | |||
24 | $configurationDefinition = $container |
||
25 | ->getDefinition('bgy_oauth2_server.authorization_server') |
||
26 | ; |
||
27 | |||
28 | $grantTypesServices = is_array($configurationDefinition->getArgument(4)) |
||
29 | ? $configurationDefinition->getArgument(4) |
||
30 | : [] |
||
31 | ; |
||
32 | |||
33 | foreach ($taggedServices as $id => $attributes) { |
||
34 | $grantTypesServices[] = new Reference($id); |
||
35 | } |
||
36 | |||
37 | $configurationDefinition->replaceArgument(4, $grantTypesServices); |
||
38 | } |
||
39 | } |
||
40 |