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 — 0.14 (#836)
by Jérémiah
03:47
created

GraphQLServices::get()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
c 0
b 0
f 0
nc 2
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Definition;
6
7
use GraphQL\Type\Definition\ResolveInfo;
8
use GraphQL\Type\Definition\Type;
9
use Overblog\GraphQLBundle\Validator\InputValidator;
10
use Symfony\Component\DependencyInjection\ServiceLocator;
11
12
/**
13
 * Container for special services to be passed to all generated types.
14
 */
15
final class GraphQLServices extends ServiceLocator
16
{
17
    /**
18
     * @param mixed ...$args
19
     *
20
     * @return mixed
21
     */
22 45
    public function query(string $alias, ...$args)
23
    {
24 45
        return $this->get('queryResolver')->resolve([$alias, $args]);
25
    }
26
27
    /**
28
     * @param mixed ...$args
29
     *
30
     * @return mixed
31
     */
32 19
    public function mutation(string $alias, ...$args)
33
    {
34 19
        return $this->get('mutationResolver')->resolve([$alias, $args]);
35
    }
36
37 87
    public function getType(string $typeName): ?Type
38
    {
39 87
        return $this->get('typeResolver')->resolve($typeName);
40
    }
41
42
    /**
43
     * Creates an instance of InputValidator
44
     *
45
     * @param mixed $value
46
     * @param mixed $context
47
     */
48 16
    public function createInputValidator($value, ArgumentInterface $args, $context, ResolveInfo $info): InputValidator
49
    {
50 16
        return $this->get('input_validator_factory')->create(
51 16
            new ResolverArgs($value, $args, $context, $info)
52
        );
53
    }
54
}
55