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
23:58
created

QueryTaggedServiceMappingPass   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 6
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTagName() 0 3 1
A getResolverServiceID() 0 3 1
A checkRequirements() 0 7 3
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