| Conditions | 2 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 116 | public function getVisitor(ValidationContext $context) |
|
| 16 | { |
||
| 17 | return [ |
||
| 18 | NodeKind::FRAGMENT_SPREAD => static function (FragmentSpreadNode $node) use ($context) { |
||
| 19 | 12 | $fragmentName = $node->name->value; |
|
| 20 | 12 | $fragment = $context->getFragment($fragmentName); |
|
| 21 | 12 | if ($fragment) { |
|
| 22 | 11 | return; |
|
| 23 | } |
||
| 24 | |||
| 25 | 1 | $context->reportError(new Error( |
|
| 26 | 1 | self::unknownFragmentMessage($fragmentName), |
|
| 27 | 1 | [$node->name] |
|
| 28 | )); |
||
| 41 |