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.
Completed
Push — master ( b5dfb6...a568a9 )
by Mario
40:05
created

CustomFieldHandlersPass::process()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
cc 3
nc 3
nop 1
1
<?php
2
3
namespace Netgen\InformationCollection\Container\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class CustomFieldHandlersPass implements CompilerPassInterface
10
{
11
    const FIELD_HANDLER_REGISTRY = 'netgen_information_collection.field_handler.registry';
12
    const FIELD_HANDLER = 'netgen_information_collection.field_handler.custom';
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function process(ContainerBuilder $container)
18
    {
19
        if (!$container->hasDefinition(self::FIELD_HANDLER_REGISTRY)) {
20
            return;
21
        }
22
23
        $actionAggregate = $container->getDefinition(self::FIELD_HANDLER_REGISTRY);
24
25
        foreach ($container->findTaggedServiceIds(self::FIELD_HANDLER) as $id => $attributes) {
26
            $actionAggregate->addMethodCall(
27
                'addHandler',
28
                array(
29
                    new Reference($id),
30
                )
31
            );
32
        }
33
    }
34
}
35