Test Setup Failed
Push — master ( 1595cb...1df194 )
by Kirill
02:11
created

SchemaFacadeTrait::bootSchemaFacadeTrait()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of Railt package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Railt\SDL\Compiler;
13
14
use GraphQL\Contracts\TypeSystem\SchemaInterface;
15
use Railt\TypeSystem\Schema;
16
17
/**
18
 * Trait SchemaFacadeTrait
19
 */
20
trait SchemaFacadeTrait
21
{
22
    /**
23
     * @var Schema
24
     */
25
    protected Schema $schema;
26
27
    /**
28
     * @return Schema
29
     */
30
    public function getSchema(): Schema
31
    {
32
        return $this->schema;
33
    }
34
35
    /**
36
     * @param Schema $schema
37
     * @return $this
38
     */
39
    public function setSchema(Schema $schema): self
40
    {
41
        $this->schema = $schema;
42
43
        return $this;
44
    }
45
46
    /**
47
     * @return void
48
     * @throws \Throwable
49
     */
50
    private function bootSchemaFacadeTrait(): void
51
    {
52
        $this->schema = new Schema();
53
    }
54
}
55