Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function enterOperationDefinition(OperationDefinitionNode $node): ?NodeInterface |
||
26 | { |
||
27 | $operationName = $node->getNameValue(); |
||
28 | |||
29 | if (null !== $operationName) { |
||
30 | if (isset($this->knownOperationNames[$operationName])) { |
||
31 | $this->context->reportError( |
||
32 | new ValidationException( |
||
33 | duplicateOperationMessage($operationName), |
||
34 | [$this->knownOperationNames[$operationName], $node->getName()] |
||
35 | ) |
||
36 | ); |
||
37 | } else { |
||
38 | $this->knownOperationNames[$operationName] = $node->getName(); |
||
39 | } |
||
40 | } |
||
41 | |||
42 | return $node; |
||
43 | } |
||
45 |