Test Setup Failed
Push — master ( e8c39a...45e116 )
by Kirill
02:51 queued 12s
created

DirectiveExecution::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 5
rs 10
c 1
b 0
f 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\Runtime;
13
14
use GraphQL\Contracts\TypeSystem\DirectiveInterface;
15
use GraphQL\Contracts\TypeSystem\DefinitionInterface;
16
17
/**
18
 * Class DirectiveExecution
19
 */
20
class DirectiveExecution extends Execution implements DirectiveExecutionInterface
21
{
22
    /**
23
     * @var DirectiveInterface
24
     */
25
    private DirectiveInterface $directive;
26
27
    /**
28
     * DirectiveExecution constructor.
29
     *
30
     * @param DirectiveInterface $directive
31
     * @param DefinitionInterface $context
32
     * @param iterable $arguments
33
     */
34
    public function __construct(DirectiveInterface $directive, DefinitionInterface $context, iterable $arguments = [])
35
    {
36
        $this->directive = $directive;
37
38
        parent::__construct($context, $arguments);
39
    }
40
41
    /**
42
     * @return DirectiveInterface
43
     */
44
    public function getDirective(): DirectiveInterface
45
    {
46
        return $this->directive;
47
    }
48
}
49