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

Completed
Pull Request — master (#5)
by Jérémiah
07:11
created

SchemaBuilder::warmUpTypes()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 2
eloc 3
nc 2
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Definition\Builder;
13
14
use GraphQL\Schema;
15
use GraphQL\Type\Definition\Config;
16
use Overblog\GraphQLBundle\Resolver\ResolverInterface;
17
18
class SchemaBuilder
19
{
20
    /**
21
     * @var ResolverInterface
22
     */
23
    private $typeResolver;
24
25
    /** @var bool */
26
    private $enableValidation;
27
28 25
    public function __construct(ResolverInterface $typeResolver, $enableValidation = false)
29
    {
30 25
        $this->typeResolver = $typeResolver;
31 25
        $this->enableValidation = $enableValidation;
32 25
    }
33
34
    /**
35
     * @param null|string $queryAlias
36
     * @param null|string $mutationAlias
37
     * @param null|string $subscriptionAlias
38
     *
39
     * @return Schema
40
     */
41 25
    public function create($queryAlias = null, $mutationAlias = null, $subscriptionAlias = null)
42
    {
43 25
        $this->enableValidation ? Config::enableValidation() : Config::disableValidation();
44
45 25
        $query = $this->typeResolver->resolve($queryAlias);
46 25
        $mutation = $this->typeResolver->resolve($mutationAlias);
47 25
        $subscription = $this->typeResolver->resolve($subscriptionAlias);
48
49 25
        return new Schema($query, $mutation, $subscription);
50
    }
51
}
52