| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | protected function enterFragmentDefinition(FragmentDefinitionNode $node): VisitorResult |
||
| 36 | { |
||
| 37 | $fragmentName = $node->getNameValue(); |
||
| 38 | |||
| 39 | if (isset($this->knownFragmentNames[$fragmentName])) { |
||
| 40 | $this->context->reportError( |
||
| 41 | new ValidationException( |
||
| 42 | duplicateFragmentMessage($fragmentName), |
||
|
|
|||
| 43 | [$this->knownFragmentNames[$fragmentName], $node->getName()] |
||
| 44 | ) |
||
| 45 | ); |
||
| 46 | } else { |
||
| 47 | $this->knownFragmentNames[$fragmentName] = $node->getName(); |
||
| 48 | } |
||
| 49 | |||
| 50 | return new VisitorResult(null); |
||
| 51 | } |
||
| 53 |