@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | $suggestions = suggestionList($node->getNameValue(), $options); |
63 | 63 | |
64 | 64 | $this->context->reportError( |
65 | - new ValidationException( |
|
65 | + new ValidationException( |
|
66 | 66 | unknownArgumentMessage((string)$node, (string)$fieldDefinition, |
67 | - (string)$parentType, $suggestions), |
|
67 | + (string)$parentType, $suggestions), |
|
68 | 68 | [$node] |
69 | - ) |
|
69 | + ) |
|
70 | 70 | ); |
71 | 71 | } |
72 | 72 | |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | $suggestions = suggestionList((string)$node, $options); |
91 | 91 | |
92 | 92 | $this->context->reportError( |
93 | - new ValidationException( |
|
93 | + new ValidationException( |
|
94 | 94 | unknownDirectiveArgumentMessage((string)$node, |
95 | - (string)$directive, $suggestions), |
|
95 | + (string)$directive, $suggestions), |
|
96 | 96 | [$node] |
97 | - ) |
|
97 | + ) |
|
98 | 98 | ); |
99 | 99 | } |
100 | 100 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $parentType = $this->context->getParentType(); |
55 | 55 | |
56 | 56 | if (null !== $fieldDefinition && null !== $parentType) { |
57 | - $options = array_map(function (Argument $argument) { |
|
57 | + $options = array_map(function(Argument $argument) { |
|
58 | 58 | return $argument->getName(); |
59 | 59 | }, $fieldDefinition->getArguments()); |
60 | 60 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $directive = $this->context->getDirective(); |
84 | 84 | |
85 | 85 | if (null !== $directive) { |
86 | - $options = array_map(function (Argument $argument) { |
|
86 | + $options = array_map(function(Argument $argument) { |
|
87 | 87 | return $argument->getName(); |
88 | 88 | }, $directive->getArguments()); |
89 | 89 |
@@ -104,13 +104,13 @@ |
||
104 | 104 | $cyclePath = \array_slice($this->spreadPath, $cycleIndex); |
105 | 105 | |
106 | 106 | $this->context->reportError( |
107 | - new ValidationException( |
|
107 | + new ValidationException( |
|
108 | 108 | fragmentCycleMessage($spreadName, |
109 | - \array_map(function (FragmentSpreadNode $spread) { |
|
110 | - return $spread->getNameValue(); |
|
111 | - }, $cyclePath)), |
|
109 | + \array_map(function (FragmentSpreadNode $spread) { |
|
110 | + return $spread->getNameValue(); |
|
111 | + }, $cyclePath)), |
|
112 | 112 | \array_merge($cyclePath, [$spreadNode]) |
113 | - ) |
|
113 | + ) |
|
114 | 114 | ); |
115 | 115 | } |
116 | 116 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $this->context->reportError( |
107 | 107 | new ValidationException( |
108 | 108 | fragmentCycleMessage($spreadName, |
109 | - \array_map(function (FragmentSpreadNode $spread) { |
|
109 | + \array_map(function(FragmentSpreadNode $spread) { |
|
110 | 110 | return $spread->getNameValue(); |
111 | 111 | }, $cyclePath)), |
112 | 112 | \array_merge($cyclePath, [$spreadNode]) |
@@ -47,19 +47,19 @@ |
||
47 | 47 | { |
48 | 48 | $parentType = $this->context->getParentType(); |
49 | 49 | $conflicts = $this->findConflictsWithinSelectionSet( |
50 | - $this->cachedFieldsAndFragmentNames, |
|
51 | - $this->comparedFragmentPairs, |
|
52 | - $node, |
|
53 | - $parentType |
|
50 | + $this->cachedFieldsAndFragmentNames, |
|
51 | + $this->comparedFragmentPairs, |
|
52 | + $node, |
|
53 | + $parentType |
|
54 | 54 | ); |
55 | 55 | |
56 | 56 | foreach ($conflicts as $conflict) { |
57 | 57 | $this->context->reportError( |
58 | - new ValidationException( |
|
58 | + new ValidationException( |
|
59 | 59 | fieldsConflictMessage($conflict->getResponseName(), |
60 | - $conflict->getReason()), |
|
60 | + $conflict->getReason()), |
|
61 | 61 | $conflict->getAllFields() |
62 | - ) |
|
62 | + ) |
|
63 | 63 | ); |
64 | 64 | } |
65 | 65 |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | protected function enterDocument(DocumentNode $node): ?NodeInterface |
29 | 29 | { |
30 | 30 | $this->operationCount = \count(\array_filter($node->getDefinitions(), |
31 | - function ($definition) { |
|
32 | - return $definition instanceof OperationDefinitionNode; |
|
33 | - })); |
|
31 | + function ($definition) { |
|
32 | + return $definition instanceof OperationDefinitionNode; |
|
33 | + })); |
|
34 | 34 | |
35 | 35 | return $node; |
36 | 36 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | if (null === $node->getName() && $this->operationCount > 1) { |
45 | 45 | $this->context->reportError( |
46 | - new ValidationException(anonymousOperationNotAloneMessage(), |
|
46 | + new ValidationException(anonymousOperationNotAloneMessage(), |
|
47 | 47 | [$node]) |
48 | 48 | ); |
49 | 49 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | protected function enterDocument(DocumentNode $node): ?NodeInterface |
29 | 29 | { |
30 | 30 | $this->operationCount = \count(\array_filter($node->getDefinitions(), |
31 | - function ($definition) { |
|
31 | + function($definition) { |
|
32 | 32 | return $definition instanceof OperationDefinitionNode; |
33 | 33 | })); |
34 | 34 |
@@ -66,10 +66,10 @@ |
||
66 | 66 | |
67 | 67 | if (!isset($variableNamesUsed[$variableName])) { |
68 | 68 | $this->context->reportError( |
69 | - new ValidationException( |
|
69 | + new ValidationException( |
|
70 | 70 | unusedVariableMessage($variableName, $operationName), |
71 | 71 | [$variableDefinition] |
72 | - ) |
|
72 | + ) |
|
73 | 73 | ); |
74 | 74 | } |
75 | 75 | } |
@@ -63,18 +63,18 @@ discard block |
||
63 | 63 | // than the expected item type (contravariant). |
64 | 64 | $schema = $this->context->getSchema(); |
65 | 65 | $variableType = typeFromAST($schema, |
66 | - $variableDefinition->getType()); |
|
66 | + $variableDefinition->getType()); |
|
67 | 67 | |
68 | 68 | if (null !== $variableType && |
69 | 69 | !isTypeSubTypeOf($schema, |
70 | 70 | $this->getEffectiveType($variableType, $variableDefinition), |
71 | 71 | $type)) { |
72 | 72 | $this->context->reportError( |
73 | - new ValidationException( |
|
73 | + new ValidationException( |
|
74 | 74 | badVariablePositionMessage($variableName, $variableType, |
75 | - $type), |
|
75 | + $type), |
|
76 | 76 | [$variableDefinition, $variableNode] |
77 | - ) |
|
77 | + ) |
|
78 | 78 | ); |
79 | 79 | } |
80 | 80 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ): ?NodeInterface |
91 | 91 | { |
92 | 92 | $this->variableDefinitionMap[$node->getVariable() |
93 | - ->getNameValue()] = $node; |
|
93 | + ->getNameValue()] = $node; |
|
94 | 94 | |
95 | 95 | return $node; |
96 | 96 | } |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | * @throws InvalidTypeException |
106 | 106 | */ |
107 | 107 | protected function getEffectiveType( |
108 | - TypeInterface $variableType, |
|
109 | - VariableDefinitionNode $variableDefinition |
|
108 | + TypeInterface $variableType, |
|
109 | + VariableDefinitionNode $variableDefinition |
|
110 | 110 | ): TypeInterface { |
111 | 111 | return (!$variableDefinition->hasDefaultValue() || $variableType instanceof NonNullType) |
112 | 112 | ? $variableType |
@@ -52,10 +52,10 @@ |
||
52 | 52 | |
53 | 53 | if (isset($this->knownArgumentNames[$argumentName])) { |
54 | 54 | $this->context->reportError( |
55 | - new ValidationException( |
|
55 | + new ValidationException( |
|
56 | 56 | duplicateArgumentMessage($argumentName), |
57 | 57 | [$this->knownArgumentNames[$argumentName], $node->getName()] |
58 | - ) |
|
58 | + ) |
|
59 | 59 | ); |
60 | 60 | } else { |
61 | 61 | $this->knownArgumentNames[$argumentName] = $node->getName(); |
@@ -31,11 +31,11 @@ |
||
31 | 31 | $variableName = $node->getVariable()->getNameValue(); |
32 | 32 | |
33 | 33 | $this->context->reportError( |
34 | - new ValidationException( |
|
34 | + new ValidationException( |
|
35 | 35 | nonInputTypeOnVariableMessage($variableName, |
36 | - printNode($node->getType())), |
|
36 | + printNode($node->getType())), |
|
37 | 37 | [$node->getType()] |
38 | - ) |
|
38 | + ) |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 |
@@ -31,13 +31,13 @@ |
||
31 | 31 | if (null !== $operationName) { |
32 | 32 | if (isset($this->knownOperationNames[$operationName])) { |
33 | 33 | $this->context->reportError( |
34 | - new ValidationException( |
|
34 | + new ValidationException( |
|
35 | 35 | duplicateOperationMessage($operationName), |
36 | 36 | [ |
37 | - $this->knownOperationNames[$operationName], |
|
38 | - $node->getName(), |
|
37 | + $this->knownOperationNames[$operationName], |
|
38 | + $node->getName(), |
|
39 | 39 | ] |
40 | - ) |
|
40 | + ) |
|
41 | 41 | ); |
42 | 42 | } else { |
43 | 43 | $this->knownOperationNames[$operationName] = $node->getName(); |