Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — master (#277)
by Jérémiah
14:57
created

DefinitionConfigProcessorPass::process()   A

Complexity

Conditions 4
Paths 3

Size

Total Lines 17
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 10
cts 10
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 9
nc 3
nop 1
crap 4
1
<?php
2
3
namespace Overblog\GraphQLBundle\DependencyInjection\Compiler;
4
5
use Overblog\GraphQLBundle\Definition\ConfigProcessor;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Reference;
9
10
final class DefinitionConfigProcessorPass implements CompilerPassInterface
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 26
    public function process(ContainerBuilder $container)
16
    {
17 26
        $definition = $container->findDefinition(ConfigProcessor::class);
18 26
        $taggedServices = $container->findTaggedServiceIds('overblog_graphql.definition_config_processor', true);
19
20 26
        foreach ($taggedServices as $id => $tags) {
21 26
            foreach ($tags as $attributes) {
22 26
                $definition->addMethodCall(
23 26
                    'addConfigProcessor',
24
                    [
25 26
                        new Reference($id),
26 26
                        isset($attributes['priority']) ? $attributes['priority'] : 0,
27
                    ]
28
                );
29
            }
30
        }
31 26
    }
32
}
33