@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function buildTypes(): array |
79 | 79 | { |
80 | - return \array_map(function (TypeDefinitionNodeInterface $definition) { |
|
80 | + return \array_map(function(TypeDefinitionNodeInterface $definition) { |
|
81 | 81 | return $this->definitionBuilder->buildType($definition); |
82 | 82 | }, \array_values($this->info->getTypeDefinitionMap())); |
83 | 83 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function buildDirectives(): array |
89 | 89 | { |
90 | - $directives = \array_map(function (DirectiveDefinitionNode $definition) { |
|
90 | + $directives = \array_map(function(DirectiveDefinitionNode $definition) { |
|
91 | 91 | return $this->definitionBuilder->buildDirective($definition); |
92 | 92 | }, $this->info->getDirectiveDefinitions()); |
93 | 93 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ]; |
99 | 99 | |
100 | 100 | foreach ($specifiedDirectivesMap as $name => $directive) { |
101 | - if (!arraySome($directives, function (Directive $directive) use ($name) { |
|
101 | + if (!arraySome($directives, function(Directive $directive) use ($name) { |
|
102 | 102 | return $directive->getName() === $name; |
103 | 103 | })) { |
104 | 104 | $directives[] = $directive; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return $coercedValues; |
57 | 57 | } |
58 | 58 | |
59 | - $argumentNodeMap = keyMap($argumentNodes, function (ArgumentNode $value) { |
|
59 | + $argumentNodeMap = keyMap($argumentNodes, function(ArgumentNode $value) { |
|
60 | 60 | return $value->getNameValue(); |
61 | 61 | }); |
62 | 62 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | array $variableValues = [] |
132 | 132 | ): ?array { |
133 | 133 | $directiveNode = $node->hasDirectives() |
134 | - ? find($node->getDirectives(), function (NameAwareInterface $value) use ($directive) { |
|
134 | + ? find($node->getDirectives(), function(NameAwareInterface $value) use ($directive) { |
|
135 | 135 | return $value->getNameValue() === $directive->getName(); |
136 | 136 | }) : null; |
137 | 137 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | ]); |
330 | 330 | } |
331 | 331 | return new CoercedValue($parseResult, null); |
332 | - } catch (InvalidTypeException|CoercingException $ex) { |
|
332 | + } catch (InvalidTypeException | CoercingException $ex) { |
|
333 | 333 | return new CoercedValue(null, [ |
334 | 334 | $this->buildCoerceException( |
335 | 335 | sprintf('Expected type %s', (string)$type), |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | } |
364 | 364 | } |
365 | 365 | |
366 | - $suggestions = suggestionList((string)$value, array_map(function (EnumValue $enumValue) { |
|
366 | + $suggestions = suggestionList((string)$value, array_map(function(EnumValue $enumValue) { |
|
367 | 367 | return $enumValue->getName(); |
368 | 368 | }, $type->getValues())); |
369 | 369 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function getTypeResolver(): ?callable |
27 | 27 | { |
28 | - return function ($rootValue, $contextValues, ResolveInfo $info) { |
|
28 | + return function($rootValue, $contextValues, ResolveInfo $info) { |
|
29 | 29 | return $this->resolveType($rootValue, $contextValues, $info); |
30 | 30 | }; |
31 | 31 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function getLocationsAsArray(): ?array |
154 | 154 | { |
155 | - return !empty($this->locations) ? \array_map(function (SourceLocation $location) { |
|
155 | + return !empty($this->locations) ? \array_map(function(SourceLocation $location) { |
|
156 | 156 | return $location->toArray(); |
157 | 157 | }, $this->locations) : null; |
158 | 158 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ? (!empty($nodes) ? $nodes : []) |
192 | 192 | : (null !== $nodes ? [$nodes] : []); |
193 | 193 | |
194 | - $this->nodes = \array_filter($nodes, function ($node) { |
|
194 | + $this->nodes = \array_filter($nodes, function($node) { |
|
195 | 195 | return null !== $node; |
196 | 196 | }); |
197 | 197 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | protected function resolvePositions(?array $positions) |
223 | 223 | { |
224 | 224 | if (null === $positions && !empty($this->nodes)) { |
225 | - $positions = \array_reduce($this->nodes, function (array $list, ?NodeInterface $node) { |
|
225 | + $positions = \array_reduce($this->nodes, function(array $list, ?NodeInterface $node) { |
|
226 | 226 | if (null !== $node) { |
227 | 227 | $location = $node->getLocation(); |
228 | 228 | if (null !== $location) { |
@@ -250,11 +250,11 @@ discard block |
||
250 | 250 | protected function resolveLocations(?array $positions, ?Source $source) |
251 | 251 | { |
252 | 252 | if (null !== $positions && null !== $source) { |
253 | - $locations = \array_map(function ($position) use ($source) { |
|
253 | + $locations = \array_map(function($position) use ($source) { |
|
254 | 254 | return SourceLocation::fromSource($source, $position); |
255 | 255 | }, $positions); |
256 | 256 | } elseif (!empty($this->nodes)) { |
257 | - $locations = \array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
257 | + $locations = \array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
258 | 258 | $location = $node->getLocation(); |
259 | 259 | if (null !== $location) { |
260 | 260 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | \preg_match_all("/\r\n|[\n\r]/", \substr($source->getBody(), 0, $position), $matches, PREG_OFFSET_CAPTURE); |
62 | 62 | |
63 | 63 | foreach ($matches[0] as $index => $match) { |
64 | - $line += 1; |
|
64 | + $line += 1; |
|
65 | 65 | $column = $position + 1 - ($match[1] + \strlen($match[0])); |
66 | 66 | } |
67 | 67 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function getArgumentsAsArray(): array |
34 | 34 | { |
35 | - return \array_map(function (SerializationInterface $node) { |
|
35 | + return \array_map(function(SerializationInterface $node) { |
|
36 | 36 | return $node->toArray(); |
37 | 37 | }, $this->getArguments()); |
38 | 38 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function getDefinitionsAsArray(): array |
40 | 40 | { |
41 | - return \array_map(function (SerializationInterface $node) { |
|
41 | + return \array_map(function(SerializationInterface $node) { |
|
42 | 42 | return $node->toArray(); |
43 | 43 | }, $this->definitions); |
44 | 44 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function getOperationTypesAsArray(): array |
44 | 44 | { |
45 | - return \array_map(function (SerializationInterface $node) { |
|
45 | + return \array_map(function(SerializationInterface $node) { |
|
46 | 46 | return $node->toArray(); |
47 | 47 | }, $this->operationTypes); |
48 | 48 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function getLocationsAsArray(): array |
55 | 55 | { |
56 | - return \array_map(function (SerializationInterface $node) { |
|
56 | + return \array_map(function(SerializationInterface $node) { |
|
57 | 57 | return $node->toArray(); |
58 | 58 | }, $this->locations); |
59 | 59 | } |