Test Setup Failed
Push — master ( b48cec...128107 )
by Kirill
02:20
created

Document::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\SDL;
11
12
use Railt\Contracts\SDL\DocumentInterface;
13
use GraphQL\Contracts\TypeSystem\SchemaInterface;
14
use GraphQL\Contracts\TypeSystem\DirectiveInterface;
15
use GraphQL\Contracts\TypeSystem\Type\NamedTypeInterface;
16
17
/**
18
 * Class Document
19
 */
20
final class Document implements DocumentInterface
21
{
22
    /**
23
     * @var array|NamedTypeInterface[]
24
     */
25
    public array $typeMap = [];
26
27
    /**
28
     * @var array|DirectiveInterface[]
29
     */
30
    public array $directives = [];
31
32
    /**
33
     * @var SchemaInterface|null
34
     */
35
    public ?SchemaInterface $schema = null;
36
37
    /**
38
     * {@inheritDoc}
39
     */
40
    public function getTypeMap(): iterable
41
    {
42
        return $this->typeMap;
43
    }
44
45
    /**
46
     * {@inheritDoc}
47
     */
48
    public function getDirectives(): iterable
49
    {
50
        return $this->directives;
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    public function getSchema(): ?SchemaInterface
57
    {
58
        return $this->schema;
59
    }
60
}
61