GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AddGroupDefinitionPass::process()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 3
nc 3
nop 1
1
<?php
2
3
namespace Opensoft\RolloutBundle\DependencyInjection\Compiler;
4
5
use Opensoft\RolloutBundle\Rollout\GroupDefinitionAwareRollout;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Reference;
9
10
/**
11
 * @author Richard Fullmer <[email protected]>
12
 */
13
class AddGroupDefinitionPass implements CompilerPassInterface
14
{
15
    /**
16
     * You can modify the container here before it is dumped to PHP code.
17
     *
18
     * @param ContainerBuilder $container
19
     *
20
     * @api
21
     */
22
    public function process(ContainerBuilder $container)
23
    {
24
        if (!$container->hasDefinition(GroupDefinitionAwareRollout::class)) {
25
            return;
26
        }
27
28
        $definition = $container->getDefinition(GroupDefinitionAwareRollout::class);
29
30
        foreach ($container->findTaggedServiceIds('rollout.group') as $id => $attributes) {
31
            $definition->addMethodCall('addGroupDefinition', array(new Reference($id)));
32
        }
33
    }
34
}
35