Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | */ |
||
18 | public static function isValidError(string $name, $node = null): ?ValidationException |
||
19 | { |
||
20 | if (\strlen($name) > 1 && $name{0} === '_' && $name{1} === '_') { |
||
21 | return new ValidationException( |
||
22 | sprintf('Name "%s" must not begin with "__", which is reserved by GraphQL introspection.', $name), |
||
23 | $node instanceof NodeInterface ? [$node] : null |
||
24 | ); |
||
25 | } |
||
26 | |||
37 |