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 (#234)
by Jérémiah
04:38
created

SchemaBuilder::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Overblog\GraphQLBundle\Definition\Builder;
4
5
use GraphQL\Type\Schema;
6
use Overblog\GraphQLBundle\Resolver\ResolverInterface;
7
8
class SchemaBuilder
9
{
10
    /** @var ResolverInterface */
11
    private $typeResolver;
12
13
    /** @var bool */
14
    private $enableValidation;
15
16
    public function __construct(ResolverInterface $typeResolver, $enableValidation = false)
17
    {
18
        $this->typeResolver = $typeResolver;
19
        $this->enableValidation = $enableValidation;
20
    }
21
22
    /**
23
     * @param null|string $queryAlias
24
     * @param null|string $mutationAlias
25
     * @param null|string $subscriptionAlias
26
     *
27
     * @return Schema
28
     */
29
    public function create($queryAlias = null, $mutationAlias = null, $subscriptionAlias = null)
30
    {
31
        $query = $this->typeResolver->resolve($queryAlias);
32
        $mutation = $this->typeResolver->resolve($mutationAlias);
33
        $subscription = $this->typeResolver->resolve($subscriptionAlias);
34
35
        $schema = new Schema([
36
            'query' => $query,
37
            'mutation' => $mutation,
38
            'subscription' => $subscription,
39
            'typeLoader' => [$this->typeResolver, 'resolve'],
40
            'types' => [$this->typeResolver, 'getSolutions'],
41
        ]);
42
        if ($this->enableValidation) {
43
            $schema->assertValid();
44
        }
45
46
        return $schema;
47
    }
48
}
49