@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getTypesAST(): array |
| 32 | 32 | { |
| 33 | - return \array_map(function (NamedTypeNode $node) { |
|
| 33 | + return \array_map(function(NamedTypeNode $node) { |
|
| 34 | 34 | return $node->toAST(); |
| 35 | 35 | }, $this->types); |
| 36 | 36 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getValuesAST(): array |
| 32 | 32 | { |
| 33 | - return \array_map(function (EnumValueDefinitionNode $node) { |
|
| 33 | + return \array_map(function(EnumValueDefinitionNode $node) { |
|
| 34 | 34 | return $node->toAST(); |
| 35 | 35 | }, $this->values); |
| 36 | 36 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getValuesAST(): array |
| 39 | 39 | { |
| 40 | - return \array_map(function (ValueNodeInterface $node) { |
|
| 40 | + return \array_map(function(ValueNodeInterface $node) { |
|
| 41 | 41 | return $node->toAST(); |
| 42 | 42 | }, $this->values); |
| 43 | 43 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function __toString(): string |
| 71 | 71 | { |
| 72 | - return \json_encode(\array_map(function (ValueAwareInterface $node) { |
|
| 72 | + return \json_encode(\array_map(function(ValueAwareInterface $node) { |
|
| 73 | 73 | return $node->getValue(); |
| 74 | 74 | }, $this->getValues())); |
| 75 | 75 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function getArgumentsAST(): array |
| 32 | 32 | { |
| 33 | - return \array_map(function (ArgumentNode $node) { |
|
| 33 | + return \array_map(function(ArgumentNode $node) { |
|
| 34 | 34 | return $node->toAST(); |
| 35 | 35 | }, $this->getArguments()); |
| 36 | 36 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $array = []; |
| 67 | 67 | |
| 68 | 68 | if (!empty($this->errors)) { |
| 69 | - $array['errors'] = \array_map(function (GraphQLException $error) { |
|
| 69 | + $array['errors'] = \array_map(function(GraphQLException $error) { |
|
| 70 | 70 | return $error->toArray(); |
| 71 | 71 | }, $this->errors); |
| 72 | 72 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | ?TypeInterface $initialType = null |
| 78 | 78 | ) { |
| 79 | 79 | $this->schema = $schema; |
| 80 | - $this->getFieldDefinitionFunction = $getFieldDefinitionFunction ?? function ( |
|
| 80 | + $this->getFieldDefinitionFunction = $getFieldDefinitionFunction ?? function( |
|
| 81 | 81 | Schema $schema, |
| 82 | 82 | TypeInterface $parentType, |
| 83 | 83 | FieldNode $fieldNode |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | function printLines(array $lines): string |
| 75 | 75 | { |
| 76 | 76 | // Don't print empty lines |
| 77 | - $lines = \array_filter($lines, function (string $line) { |
|
| 77 | + $lines = \array_filter($lines, function(string $line) { |
|
| 78 | 78 | return $line !== ''; |
| 79 | 79 | }); |
| 80 | 80 | |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | // If both types are abstract, then determine if there is any intersection |
| 128 | 128 | // between possible concrete types of each. |
| 129 | 129 | return arraySome($schema->getPossibleTypes($typeA), |
| 130 | - function (NamedTypeInterface $type) use ($schema, $typeB) { |
|
| 130 | + function(NamedTypeInterface $type) use ($schema, $typeB) { |
|
| 131 | 131 | return $schema->isPossibleType($typeB, $type); |
| 132 | 132 | }); |
| 133 | 133 | } |
@@ -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 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $nodes = [$nodes]; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - $this->nodes = \array_filter($nodes, function ($node) { |
|
| 196 | + $this->nodes = \array_filter($nodes, function($node) { |
|
| 197 | 197 | return null !== $node; |
| 198 | 198 | }); |
| 199 | 199 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | protected function resolvePositions(?array $positions) |
| 225 | 225 | { |
| 226 | 226 | if (null === $positions && !empty($this->nodes)) { |
| 227 | - $positions = \array_reduce($this->nodes, function (array $list, ?NodeInterface $node) { |
|
| 227 | + $positions = \array_reduce($this->nodes, function(array $list, ?NodeInterface $node) { |
|
| 228 | 228 | if (null !== $node) { |
| 229 | 229 | $location = $node->getLocation(); |
| 230 | 230 | if (null !== $location) { |
@@ -252,11 +252,11 @@ discard block |
||
| 252 | 252 | protected function resolveLocations(?array $positions, ?Source $source) |
| 253 | 253 | { |
| 254 | 254 | if (null !== $positions && null !== $source) { |
| 255 | - $locations = \array_map(function ($position) use ($source) { |
|
| 255 | + $locations = \array_map(function($position) use ($source) { |
|
| 256 | 256 | return SourceLocation::fromSource($source, $position); |
| 257 | 257 | }, $positions); |
| 258 | 258 | } elseif (!empty($this->nodes)) { |
| 259 | - $locations = \array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
| 259 | + $locations = \array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
| 260 | 260 | $location = $node->getLocation(); |
| 261 | 261 | if (null !== $location) { |
| 262 | 262 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |