Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function enterNode(NodeInterface $node): ?NodeInterface |
||
26 | { |
||
27 | if ($node instanceof SelectionSetNode) { |
||
28 | $parentType = $this->validationContext->getParentType(); |
||
29 | |||
30 | foreach ($this->findConflictsWithinSelectionSet($node, $parentType) as $conflict) { |
||
|
|||
31 | $this->validationContext->reportError( |
||
32 | new ValidationException( |
||
33 | fieldsConflictMessage($conflict->getResponseName(), $conflict->getReason()), |
||
34 | $conflict->getAllFields() |
||
35 | ) |
||
36 | ); |
||
37 | } |
||
38 | } |
||
39 | |||
40 | return $node; |
||
41 | } |
||
43 |