@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function getLocationsAsArray(): ?array |
151 | 151 | { |
152 | - return !empty($this->locations) ? array_map(function (SourceLocation $location) { |
|
152 | + return !empty($this->locations) ? array_map(function(SourceLocation $location) { |
|
153 | 153 | return $location->toArray(); |
154 | 154 | }, $this->locations) : null; |
155 | 155 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | protected function resolvePositions(?array $positions) |
216 | 216 | { |
217 | 217 | if (null === $positions && !empty($this->nodes)) { |
218 | - $positions = array_reduce($this->nodes, function (array $list, ?NodeInterface $node) { |
|
218 | + $positions = array_reduce($this->nodes, function(array $list, ?NodeInterface $node) { |
|
219 | 219 | if (null !== $node) { |
220 | 220 | $location = $node->getLocation(); |
221 | 221 | if (null !== $location) { |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | protected function resolveLocations(?array $positions, ?Source $source) |
244 | 244 | { |
245 | 245 | if (null !== $positions && null !== $source) { |
246 | - $locations = array_map(function ($position) use ($source) { |
|
246 | + $locations = array_map(function($position) use ($source) { |
|
247 | 247 | return SourceLocation::fromSource($source, $position); |
248 | 248 | }, $positions); |
249 | 249 | } elseif (!empty($this->nodes)) { |
250 | - $locations = array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
250 | + $locations = array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
251 | 251 | $location = $node->getLocation(); |
252 | 252 | if (null !== $location) { |
253 | 253 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |
@@ -89,7 +89,7 @@ |
||
89 | 89 | /** @var OperationTypeDefinitionNode $operationTypeNode */ |
90 | 90 | $operationTypeNode = find( |
91 | 91 | $node->getOperationTypes(), |
92 | - function (OperationTypeDefinitionNode $operationType) use ($operation) { |
|
92 | + function(OperationTypeDefinitionNode $operationType) use ($operation) { |
|
93 | 93 | return $operationType->getOperation() === $operation; |
94 | 94 | } |
95 | 95 | ); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | $errors = validateSchema($schema); |
16 | 16 | |
17 | 17 | if (!empty($errors)) { |
18 | - $message = \implode("\n", array_map(function (ValidationException $error) { |
|
18 | + $message = \implode("\n", array_map(function(ValidationException $error) { |
|
19 | 19 | return $error->getMessage(); |
20 | 20 | }, $errors)); |
21 | 21 |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | // Assert each interface field arg is implemented. |
301 | 301 | foreach ($interfaceField->getArguments() as $interfaceArgument) { |
302 | 302 | $argumentName = $interfaceArgument->getName(); |
303 | - $objectArgument = find($objectField->getArguments(), function (Argument $argument) use ($argumentName) { |
|
303 | + $objectArgument = find($objectField->getArguments(), function(Argument $argument) use ($argumentName) { |
|
304 | 304 | return $argument->getName() === $argumentName; |
305 | 305 | }); |
306 | 306 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | foreach ($objectFields as $objectArgument) { |
360 | 360 | $argumentName = $objectArgument->getName(); |
361 | 361 | $interfaceArgument = find($interfaceField->getArguments(), |
362 | - function (Argument $argument) use ($argumentName) { |
|
362 | + function(Argument $argument) use ($argumentName) { |
|
363 | 363 | return $argument->getName() === $argumentName; |
364 | 364 | }); |
365 | 365 | |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | return null; |
694 | 694 | } |
695 | 695 | |
696 | - return \array_filter($node->getTypes(), function (NamedTypeNode $type) use ($memberTypeName) { |
|
696 | + return \array_filter($node->getTypes(), function(NamedTypeNode $type) use ($memberTypeName) { |
|
697 | 697 | return $type->getNameValue() === $memberTypeName; |
698 | 698 | }); |
699 | 699 | } |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | return null; |
713 | 713 | } |
714 | 714 | |
715 | - return \array_filter($node->getValues(), function (NamedTypeNode $type) use ($valueName) { |
|
715 | + return \array_filter($node->getValues(), function(NamedTypeNode $type) use ($valueName) { |
|
716 | 716 | return $type->getNameValue() === $valueName; |
717 | 717 | }); |
718 | 718 | } |