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