@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | if ($type instanceof EnumType) { |
156 | 156 | $suggestions = suggestionList(printNode($node), |
157 | - \array_map(function (EnumValue $value) { |
|
157 | + \array_map(function(EnumValue $value) { |
|
158 | 158 | return $value->getName(); |
159 | 159 | }, $type->getValues())); |
160 | 160 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | // Ensure every required field exists. |
210 | 210 | $inputFields = $type->getFields(); |
211 | 211 | $fieldNodeMap = keyMap($node->getFields(), |
212 | - function (ObjectFieldNode $field) { |
|
212 | + function(ObjectFieldNode $field) { |
|
213 | 213 | return $field->getNameValue(); |
214 | 214 | }); |
215 | 215 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $suggestedInterfaceTypes = \array_keys($interfaceUsageCount); |
112 | 112 | |
113 | 113 | \uasort($suggestedInterfaceTypes, |
114 | - function ($a, $b) use ($interfaceUsageCount) { |
|
114 | + function($a, $b) use ($interfaceUsageCount) { |
|
115 | 115 | return $interfaceUsageCount[$b] - $interfaceUsageCount[$a]; |
116 | 116 | }); |
117 | 117 |
@@ -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]) |
@@ -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 |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $usages = []; |
205 | 205 | $typeInfo = new TypeInfo($this->schema); |
206 | 206 | $visitor = new TypeInfoVisitor($typeInfo, new Visitor( |
207 | - function (NodeInterface $node) use ( |
|
207 | + function(NodeInterface $node) use ( |
|
208 | 208 | &$usages, |
209 | 209 | $typeInfo |
210 | 210 | ): ?NodeInterface { |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | { |
309 | 309 | if (empty($this->fragments)) { |
310 | 310 | $this->fragments = array_reduce($this->document->getDefinitions(), |
311 | - function ($fragments, $definition) { |
|
311 | + function($fragments, $definition) { |
|
312 | 312 | if ($definition instanceof FragmentDefinitionNode) { |
313 | 313 | $fragments[$definition->getNameValue()] = $definition; |
314 | 314 | } |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | $message = sprintf('Cannot query field "%s" on type "%s".', $fieldName, |
32 | 32 | $type); |
33 | 33 | if (!empty($suggestedTypeNames)) { |
34 | - return $message.' '.sprintf( |
|
34 | + return $message . ' ' . sprintf( |
|
35 | 35 | 'Did you mean to use an inline fragment on %s?', |
36 | 36 | quotedOrList($suggestedTypeNames) |
37 | 37 | ); |
38 | 38 | } |
39 | 39 | if (!empty($suggestedFieldNames)) { |
40 | - return $message.' '.sprintf('Did you mean %s?', |
|
40 | + return $message . ' ' . sprintf('Did you mean %s?', |
|
41 | 41 | quotedOrList($suggestedFieldNames)); |
42 | 42 | } |
43 | 43 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $message = sprintf('Unknown argument "%s" on field "%s" of type "%s".', |
87 | 87 | $argumentName, $fieldName, $typeName); |
88 | 88 | if (!empty($suggestedArguments)) { |
89 | - return $message.' '.sprintf('Did you mean %s', |
|
89 | + return $message . ' ' . sprintf('Did you mean %s', |
|
90 | 90 | quotedOrList($suggestedArguments)); |
91 | 91 | } |
92 | 92 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $message = sprintf('Unknown argument "%s" on directive "@%s".', |
109 | 109 | $argumentName, $directiveName); |
110 | 110 | if (!empty($suggestedArguments)) { |
111 | - return $message.' '.sprintf('Did you mean %s', |
|
111 | + return $message . ' ' . sprintf('Did you mean %s', |
|
112 | 112 | quotedOrList($suggestedArguments)); |
113 | 113 | } |
114 | 114 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $message = sprintf('Unknown type "%s".', $typeName); |
161 | 161 | if (!empty($suggestedTypes)) { |
162 | - return $message.' '.sprintf('Did you mean %s?', |
|
162 | + return $message . ' ' . sprintf('Did you mean %s?', |
|
163 | 163 | quotedOrList($suggestedTypes)); |
164 | 164 | } |
165 | 165 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | function fragmentCycleMessage(string $fragmentName, array $spreadNames): string |
184 | 184 | { |
185 | - $via = !empty($spreadNames) ? ' via '.implode(', ', $spreadNames) : ''; |
|
185 | + $via = !empty($spreadNames) ? ' via ' . implode(', ', $spreadNames) : ''; |
|
186 | 186 | |
187 | 187 | return sprintf('Cannot spread fragment "%s" within itself%s.', |
188 | 188 | $fragmentName, $via); |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | return conflictReasonMessage([$reason]); |
263 | 263 | } |
264 | 264 | |
265 | - return implode(' and ', array_map(function ($reason) { |
|
265 | + return implode(' and ', array_map(function($reason) { |
|
266 | 266 | [$responseName, $subreason] = $reason; |
267 | 267 | |
268 | 268 | return sprintf('subfields "%s" conflict because %s', $responseName, |