| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function enterNode(NodeInterface $node): ?NodeInterface |
||
| 22 | { |
||
| 23 | if ($node instanceof FragmentSpreadNode) { |
||
| 24 | $fragmentName = $node->getNameValue(); |
||
| 25 | $fragment = $this->validationContext->getFragment($fragmentName); |
||
| 26 | |||
| 27 | if (null === $fragment) { |
||
| 28 | $this->validationContext->reportError( |
||
| 29 | new ValidationException(unknownFragmentMessage($fragmentName), [$node->getName()]) |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | return $node; |
||
| 35 | } |
||
| 37 |