Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function enterDocument(DocumentNode $node): ?NodeInterface |
||
24 | { |
||
25 | foreach ($node->getDefinitions() as $definition) { |
||
26 | if (!$definition instanceof ExecutableDefinitionNodeInterface) { |
||
27 | /** @noinspection PhpUndefinedMethodInspection */ |
||
28 | $this->context->reportError( |
||
29 | new ValidationException( |
||
30 | nonExecutableDefinitionMessage( |
||
31 | $definition instanceof SchemaDefinitionNode ? 'schema' : $definition->getNameValue() |
||
32 | ), |
||
33 | [$definition] |
||
34 | ) |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 | |||
39 | return $node; |
||
40 | } |
||
42 |