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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 41
ccs 0
cts 22
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A create() 0 19 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