TypeExtensionNode::__construct()   A
last analyzed

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 1
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\Frontend\Ast\Extension\Type;
13
14
use Railt\SDL\Frontend\Ast\Executable\DirectiveNode;
15
use Railt\SDL\Frontend\Ast\Extension\TypeSystemExtensionNode;
16
use Railt\SDL\Frontend\Ast\Identifier;
17
18
/**
19
 * Class TypeExtensionNode
20
 *
21
 * <code>
22
 *  export type TypeExtensionNode =
23
 *      | ScalarTypeExtensionNode
24
 *      | ObjectTypeExtensionNode
25
 *      | InterfaceTypeExtensionNode
26
 *      | UnionTypeExtensionNode
27
 *      | EnumTypeExtensionNode
28
 *      | InputObjectTypeExtensionNode
29
 *  ;
30
 * </code>
31
 */
32
abstract class TypeExtensionNode extends TypeSystemExtensionNode
33
{
34
    /**
35
     * @var Identifier
36
     */
37
    public Identifier $name;
38
39
    /**
40
     * @var DirectiveNode[]
41
     */
42
    public array $directives = [];
43
44
    /**
45
     * TypeExtensionNode constructor.
46
     *
47
     * @param Identifier $name
48
     */
49
    public function __construct(Identifier $name)
50
    {
51
        $this->name = $name;
52
    }
53
}
54