| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function enterNode(NodeInterface $node): ?NodeInterface |
||
| 15 | { |
||
| 16 | if ($node instanceof FragmentSpreadNode) { |
||
| 17 | $fragmentName = $node->getNameValue(); |
||
| 18 | $fragment = $this->context->getFragment($fragmentName); |
||
| 19 | |||
| 20 | if (null === $fragment) { |
||
| 21 | $this->context->reportError( |
||
| 22 | new ValidationException(unknownFragmentMessage($fragmentName), [$node->getName()]) |
||
| 23 | ); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | return $node; |
||
| 28 | } |
||
| 30 |