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 (#888)
by Ruud
22:06
created

ExtensibleSchema::addDefaultFallBackToTypeLoader()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 22
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 22
ccs 13
cts 13
cp 1
rs 9.8333
c 0
b 0
f 0
cc 2
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Definition\Type;
6
7
use GraphQL\Type\Definition\Type;
8
use GraphQL\Type\Schema;
9
use GraphQL\Type\SchemaConfig;
10
use Overblog\GraphQLBundle\Definition\Type\SchemaExtension\SchemaExtensionInterface;
11
use Overblog\GraphQLBundle\Resolver\UnresolvableException;
12
13
class ExtensibleSchema extends Schema
14
{
15 112
    public function __construct($config)
16
    {
17 112
        parent::__construct(
18 112
            $config instanceof SchemaConfig ? $config : SchemaConfig::create($config)
19
        );
20 112
    }
21
22
    /** @var SchemaExtensionInterface[] */
23
    private array $extensions = [];
24
25
    /**
26
     * @param SchemaExtensionInterface[] $extensions
27
     *
28
     * @return $this
29
     */
30 111
    public function setExtensions(array $extensions)
31
    {
32 111
        $this->extensions = [];
33 111
        foreach ($extensions as $extension) {
34 83
            $this->addExtension($extension);
35
        }
36
37 111
        return $this;
38
    }
39
40 83
    public function addExtension(SchemaExtensionInterface $extension): void
41
    {
42 83
        $this->extensions[] = $extension;
43 83
    }
44
45
    /**
46
     * @return $this
47
     */
48 108
    public function processExtensions()
49
    {
50 108
        foreach ($this->extensions as $extension) {
51 82
            $extension->process($this);
52
        }
53
54 108
        return $this;
55
    }
56
}
57