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 (#786)
by Timur
22:58
created

QueryTaggedServiceMappingPass::checkRequirements()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 3
nc 2
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\DependencyInjection\Compiler;
6
7
use InvalidArgumentException;
8
use function is_string;
9
use function sprintf;
10
11
class QueryTaggedServiceMappingPass extends TaggedServiceMappingPass
12
{
13
    protected function getTagName(): string
14
    {
15
        return 'overblog_graphql.query';
16
    }
17
18
    protected function checkRequirements(string $id, array $tag): void
19
    {
20
        parent::checkRequirements($id, $tag);
21
22
        if (isset($tag['method']) && !is_string($tag['method'])) {
23
            throw new InvalidArgumentException(
24
                sprintf('Service tagged "%s" must have valid "method" argument.', $id)
25
            );
26
        }
27
    }
28
29
    protected function getResolverServiceID(): string
30
    {
31
        return 'overblog_graphql.query_resolver';
32
    }
33
}
34