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

Completed
Pull Request — master (#511)
by Andrey
19:22
created

ConfigProcessorPass::process()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 3.0123

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 16
ccs 8
cts 9
cp 0.8889
rs 10
cc 3
nc 3
nop 1
crap 3.0123
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\DependencyInjection\Compiler;
6
7
use Overblog\GraphQLBundle\Definition\ConfigProcessor;
8
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Reference;
11
12
class ConfigProcessorPass implements CompilerPassInterface
13
{
14 31
    public function process(ContainerBuilder $container): void
15
    {
16 31
        if (!$container->has(ConfigProcessor::class)) {
17
            return;
18
        }
19
20 31
        $definition = $container->findDefinition(ConfigProcessor::class);
21
22 31
        $taggedServices = $container->findTaggedServiceIds('overblog_graphql.definition_config_processor');
23
24 31
        $arguments = [];
25 31
        foreach ($taggedServices as $id => $tags) {
26 31
            $arguments[] = new Reference($id);
27
        }
28
29 31
        $definition->setArgument('$processors', $arguments);
30 31
    }
31
}
32