@@ -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 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ): ?NodeInterface |
30 | 30 | { |
31 | 31 | $this->validateFragementNode($node, |
32 | - function (FragmentDefinitionNode $node) { |
|
32 | + function(FragmentDefinitionNode $node) { |
|
33 | 33 | return fragmentOnNonCompositeMessage((string)$node, |
34 | 34 | (string)$node->getTypeCondition()); |
35 | 35 | }); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | ): ?NodeInterface |
45 | 45 | { |
46 | 46 | $this->validateFragementNode($node, |
47 | - function (InlineFragmentNode $node) { |
|
47 | + function(InlineFragmentNode $node) { |
|
48 | 48 | return inlineFragmentOnNonCompositeMessage((string)$node->getTypeCondition()); |
49 | 49 | }); |
50 | 50 |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | { |
153 | 153 | if ($type instanceof EnumType) { |
154 | 154 | $suggestions = suggestionList(printNode($node), |
155 | - \array_map(function (EnumValue $value) { |
|
155 | + \array_map(function(EnumValue $value) { |
|
156 | 156 | return $value->getName(); |
157 | 157 | }, $type->getValues())); |
158 | 158 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | // Ensure every required field exists. |
207 | 207 | $inputFields = $type->getFields(); |
208 | 208 | $fieldNodeMap = keyMap($node->getFields(), |
209 | - function (ObjectFieldNode $field) { |
|
209 | + function(ObjectFieldNode $field) { |
|
210 | 210 | return $field->getNameValue(); |
211 | 211 | }); |
212 | 212 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $argumentNodes = $node->getArguments(); |
38 | 38 | $argumentNodeMap = keyMap($argumentNodes, |
39 | - function (ArgumentNode $argument) { |
|
39 | + function(ArgumentNode $argument) { |
|
40 | 40 | return $argument->getNameValue(); |
41 | 41 | }); |
42 | 42 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | $argumentNodes = $node->getArguments(); |
76 | 76 | $argumentNodeMap = keyMap($argumentNodes, |
77 | - function (ArgumentNode $argument) { |
|
77 | + function(ArgumentNode $argument) { |
|
78 | 78 | return $argument->getNameValue(); |
79 | 79 | }); |
80 | 80 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | /** @var Directive $directiveDefinition */ |
51 | 51 | $directiveDefinition = find( |
52 | 52 | $this->context->getSchema()->getDirectives(), |
53 | - function (Directive $definition) use ($node) { |
|
53 | + function(Directive $definition) use ($node) { |
|
54 | 54 | return $definition->getName() === $node->getNameValue(); |
55 | 55 | } |
56 | 56 | ); |