Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class OperationTypeDefinitionNode extends AbstractNode implements DefinitionNodeInterface |
||
8 | { |
||
9 | use TypeTrait; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $operation; |
||
15 | |||
16 | /** |
||
17 | * OperationTypeDefinitionNode constructor. |
||
18 | * |
||
19 | * @param string $operation |
||
20 | * @param TypeNodeInterface $type |
||
21 | * @param Location|null $location |
||
22 | */ |
||
23 | public function __construct(string $operation, TypeNodeInterface $type, ?Location $location) |
||
24 | { |
||
25 | parent::__construct(NodeKindEnum::OPERATION_TYPE_DEFINITION, $location); |
||
26 | |||
27 | $this->operation = $operation; |
||
28 | $this->type = $type; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return string |
||
33 | */ |
||
34 | public function getOperation(): string |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | public function toAST(): array |
||
52 |