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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 17 3
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