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 (#292)
by Jérémiah
21:03 queued 10:39
created

ExtensibleSchema::addExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Definition\Type;
4
5
use GraphQL\Type\Schema;
6
use Overblog\GraphQLBundle\Definition\Type\SchemaExtension\SchemaExtensionInterface;
7
8
class ExtensibleSchema extends Schema
9
{
10
    /** @var SchemaExtensionInterface[] */
11
    private $extensions = [];
12
13
    /**
14
     * @param SchemaExtensionInterface[] $extensions
15
     *
16
     * @return $this
17
     */
18
    public function setExtensions(array $extensions)
19
    {
20
        foreach ($extensions as $extension) {
21
            $this->addExtension($extension);
22
        }
23
24
        return $this;
25
    }
26
27
    /**
28
     * @param SchemaExtensionInterface $extension
29
     */
30 72
    public function addExtension(SchemaExtensionInterface $extension)
31
    {
32 72
        $this->extensions[] = $extension;
33 72
    }
34
35
    /**
36
     * @return $this
37
     */
38 68
    public function processExtensions()
39
    {
40 68
        foreach ($this->extensions as $extension) {
41 66
            $extension->process($this);
42
        }
43
44 68
        return $this;
45
    }
46
}
47