@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | public function getMultiple($keys, $default = null) |
61 | 61 | { |
62 | - return array_filter($this->cache, function ($key) use ($keys) { |
|
62 | + return array_filter($this->cache, function($key) use ($keys) { |
|
63 | 63 | return \in_array($key, $keys, true); |
64 | 64 | }, ARRAY_FILTER_USE_KEY); |
65 | 65 | } |
@@ -72,7 +72,7 @@ |
||
72 | 72 | { |
73 | 73 | return arraySome( |
74 | 74 | specifiedScalarTypes(), |
75 | - function (ScalarType $specifiedScalarType) use ($type) { |
|
75 | + function(ScalarType $specifiedScalarType) use ($type) { |
|
76 | 76 | /** @noinspection PhpUndefinedMethodInspection */ |
77 | 77 | return $type->getName() === $specifiedScalarType->getName(); |
78 | 78 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $this->schema = $schema; |
79 | 79 | $this->getFieldDefinitionFunction = null !== $getFieldDefinitionFunction |
80 | 80 | ? $getFieldDefinitionFunction |
81 | - : function (SchemaInterface $schema, TypeInterface $parentType, FieldNode $fieldNode) { |
|
81 | + : function(SchemaInterface $schema, TypeInterface $parentType, FieldNode $fieldNode) { |
|
82 | 82 | return getFieldDefinition($schema, $parentType, $fieldNode); |
83 | 83 | }; |
84 | 84 |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function getFragment(string $name): ?FragmentDefinitionNode |
144 | 144 | { |
145 | 145 | if (empty($this->fragments)) { |
146 | - $this->fragments = array_reduce($this->document->getDefinitions(), function ($fragments, $definition) { |
|
146 | + $this->fragments = array_reduce($this->document->getDefinitions(), function($fragments, $definition) { |
|
147 | 147 | if ($definition instanceof FragmentDefinitionNode) { |
148 | 148 | $fragments[$definition->getNameValue()] = $definition; |
149 | 149 | } |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $usages = []; |
222 | 222 | $typeInfo = new TypeInfo($this->schema); |
223 | 223 | $visitor = new TypeInfoVisitor($typeInfo, new Visitor( |
224 | - function (NodeInterface $node) use (&$usages, $typeInfo): ?NodeInterface { |
|
224 | + function(NodeInterface $node) use (&$usages, $typeInfo): ?NodeInterface { |
|
225 | 225 | if ($node instanceof VariableDefinitionNode) { |
226 | 226 | return null; |
227 | 227 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | protected function printNodes(array $nodes): array |
38 | 38 | { |
39 | - return array_map(function ($node) { |
|
39 | + return array_map(function($node) { |
|
40 | 40 | return $this->printer->print($node); |
41 | 41 | }, $nodes); |
42 | 42 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | if (null !== $fieldOrDirective) { |
107 | 107 | $argumentDefinition = find( |
108 | 108 | $fieldOrDirective->getArguments(), |
109 | - function (Argument $argument) use ($node) { |
|
109 | + function(Argument $argument) use ($node) { |
|
110 | 110 | return $argument->getName() === $node->getNameValue(); |
111 | 111 | } |
112 | 112 | ); |
@@ -691,13 +691,13 @@ |
||
691 | 691 | |
692 | 692 | return new Conflict( |
693 | 693 | $responseName, |
694 | - array_map(function (Conflict $conflict) { |
|
694 | + array_map(function(Conflict $conflict) { |
|
695 | 695 | return [$conflict->getResponseName(), $conflict->getReason()]; |
696 | 696 | }, $conflicts), |
697 | - array_reduce($conflicts, function ($allFields, Conflict $conflict) { |
|
697 | + array_reduce($conflicts, function($allFields, Conflict $conflict) { |
|
698 | 698 | return array_merge($allFields, $conflict->getFieldsA()); |
699 | 699 | }, [$nodeA]), |
700 | - array_reduce($conflicts, function ($allFields, Conflict $conflict) { |
|
700 | + array_reduce($conflicts, function($allFields, Conflict $conflict) { |
|
701 | 701 | return array_merge($allFields, $conflict->getFieldsB()); |
702 | 702 | }, [$nodeB]) |
703 | 703 | ); |
@@ -218,7 +218,7 @@ |
||
218 | 218 | return conflictReasonMessage([$reason]); |
219 | 219 | } |
220 | 220 | |
221 | - return implode(' and ', array_map(function ($reason) { |
|
221 | + return implode(' and ', array_map(function($reason) { |
|
222 | 222 | [$responseName, $subreason] = $reason; |
223 | 223 | return sprintf('subfields "%s" conflict because %s', $responseName, conflictReasonMessage($subreason)); |
224 | 224 | }, $reason)); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | // Ensure every required field exists. |
116 | 116 | $inputFields = $type->getFields(); |
117 | - $fieldNodeMap = keyMap($node->getFields(), function (ObjectFieldNode $field) { |
|
117 | + $fieldNodeMap = keyMap($node->getFields(), function(ObjectFieldNode $field) { |
|
118 | 118 | return $field->getNameValue(); |
119 | 119 | }); |
120 | 120 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | protected function getEnumTypeSuggestion(NamedTypeInterface $type, ValueNodeInterface $node): ?string |
262 | 262 | { |
263 | 263 | if ($type instanceof EnumType) { |
264 | - $suggestions = suggestionList(printNode($node), \array_map(function (EnumValue $value) { |
|
264 | + $suggestions = suggestionList(printNode($node), \array_map(function(EnumValue $value) { |
|
265 | 265 | return $value->getName(); |
266 | 266 | }, $type->getValues())); |
267 | 267 |