@@ -129,7 +129,7 @@ |
||
| 129 | 129 | { |
| 130 | 130 | return arraySome( |
| 131 | 131 | specifiedDirectives(), |
| 132 | - function (DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 132 | + function(DirectiveInterface $specifiedDirective) use ($directive) { |
|
| 133 | 133 | return $specifiedDirective->getName() === $directive->getName(); |
| 134 | 134 | } |
| 135 | 135 | ); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | if ($code === 92) { |
| 54 | 54 | // \ |
| 55 | 55 | $value .= sliceString($body, $chunkStart, $pos + 1); |
| 56 | - $code = charCodeAt($body, $pos); |
|
| 56 | + $code = charCodeAt($body, $pos); |
|
| 57 | 57 | |
| 58 | 58 | switch ($code) { |
| 59 | 59 | case 34: |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | $coercedObject = []; |
| 102 | 102 | |
| 103 | 103 | /** @var ObjectFieldNode[] $fieldNodes */ |
| 104 | - $fieldNodes = keyMap($node->getFields(), function (FieldNode $value) { |
|
| 104 | + $fieldNodes = keyMap($node->getFields(), function(FieldNode $value) { |
|
| 105 | 105 | return $value->getNameValue(); |
| 106 | 106 | }); |
| 107 | 107 | |
@@ -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 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'name' => '__schema', |
| 84 | 84 | 'type' => GraphQLNonNull(__Schema()), |
| 85 | 85 | 'description' => 'Access the current type schema of this server.', |
| 86 | - 'resolve' => function ($source, $args, $context, $info): SchemaInterface { |
|
| 86 | + 'resolve' => function($source, $args, $context, $info): SchemaInterface { |
|
| 87 | 87 | [$schema] = $info; |
| 88 | 88 | return $schema; |
| 89 | 89 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'args' => [ |
| 104 | 104 | 'name' => ['type' => GraphQLNonNull(GraphQLString())], |
| 105 | 105 | ], |
| 106 | - 'resolve' => function ($source, $args, $context, $info): TypeInterface { |
|
| 106 | + 'resolve' => function($source, $args, $context, $info): TypeInterface { |
|
| 107 | 107 | /** @var SchemaInterface $schema */ |
| 108 | 108 | [$name] = $args; |
| 109 | 109 | [$schema] = $info; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | 'name' => '__typename', |
| 123 | 123 | 'type' => GraphQLNonNull(GraphQLString()), |
| 124 | 124 | 'description' => 'The name of the current Object type at runtime.', |
| 125 | - 'resolve' => function ($source, $args, $context, $info): string { |
|
| 125 | + 'resolve' => function($source, $args, $context, $info): string { |
|
| 126 | 126 | /** @var NamedTypeInterface $parentType */ |
| 127 | 127 | [$parentType] = $info; |
| 128 | 128 | return $parentType->getName(); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | { |
| 156 | 156 | return arraySome( |
| 157 | 157 | introspectionTypes(), |
| 158 | - function (TypeInterface $introspectionType) use ($type) { |
|
| 158 | + function(TypeInterface $introspectionType) use ($type) { |
|
| 159 | 159 | /** @noinspection PhpUndefinedMethodInspection */ |
| 160 | 160 | return $type->getName() === $introspectionType->getName(); |
| 161 | 161 | } |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | * @return mixed |
| 435 | 435 | * @throws SyntaxErrorException |
| 436 | 436 | */ |
| 437 | - $parseType = function (LexerInterface $lexer) { |
|
| 437 | + $parseType = function(LexerInterface $lexer) { |
|
| 438 | 438 | $this->expect($lexer, TokenKindEnum::COLON); |
| 439 | 439 | return $this->parseTypeReference($lexer); |
| 440 | 440 | }; |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | * @return mixed |
| 565 | 565 | * @throws SyntaxErrorException |
| 566 | 566 | */ |
| 567 | - $parseValue = function (LexerInterface $lexer) { |
|
| 567 | + $parseValue = function(LexerInterface $lexer) { |
|
| 568 | 568 | $this->expect($lexer, TokenKindEnum::COLON); |
| 569 | 569 | return $this->parseValueLiteral($lexer, false); |
| 570 | 570 | }; |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | * @return mixed |
| 592 | 592 | * @throws SyntaxErrorException |
| 593 | 593 | */ |
| 594 | - $parseValue = function (LexerInterface $lexer) { |
|
| 594 | + $parseValue = function(LexerInterface $lexer) { |
|
| 595 | 595 | $this->expect($lexer, TokenKindEnum::COLON); |
| 596 | 596 | return $this->parseConstValue($lexer); |
| 597 | 597 | }; |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | |
| 653 | 653 | $this->expectKeyword($lexer, KeywordEnum::FRAGMENT); |
| 654 | 654 | |
| 655 | - $parseTypeCondition = function (LexerInterface $lexer) { |
|
| 655 | + $parseTypeCondition = function(LexerInterface $lexer) { |
|
| 656 | 656 | $this->expectKeyword($lexer, 'on'); |
| 657 | 657 | return $this->parseNamedType($lexer); |
| 658 | 658 | }; |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | { |
| 849 | 849 | $start = $lexer->getToken(); |
| 850 | 850 | |
| 851 | - $parseValue = function (LexerInterface $lexer, bool $isConst) { |
|
| 851 | + $parseValue = function(LexerInterface $lexer, bool $isConst) { |
|
| 852 | 852 | $this->expect($lexer, TokenKindEnum::COLON); |
| 853 | 853 | return $this->parseValueLiteral($lexer, $isConst); |
| 854 | 854 | }; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | public function getLocationsAsArray(): ?array |
| 152 | 152 | { |
| 153 | - return !empty($this->locations) ? array_map(function (SourceLocation $location) { |
|
| 153 | + return !empty($this->locations) ? array_map(function(SourceLocation $location) { |
|
| 154 | 154 | return $location->toArray(); |
| 155 | 155 | }, $this->locations) : null; |
| 156 | 156 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | protected function resolvePositions(?array $positions) |
| 209 | 209 | { |
| 210 | 210 | if (null === $positions && !empty($this->nodes)) { |
| 211 | - $positions = array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
| 211 | + $positions = array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
| 212 | 212 | $location = $node->getLocation(); |
| 213 | 213 | if (null !== $location) { |
| 214 | 214 | $list[] = $location->getStart(); |
@@ -234,11 +234,11 @@ discard block |
||
| 234 | 234 | protected function resolveLocations(?array $positions, ?Source $source) |
| 235 | 235 | { |
| 236 | 236 | if (null !== $positions && null !== $source) { |
| 237 | - $locations = array_map(function ($position) use ($source) { |
|
| 237 | + $locations = array_map(function($position) use ($source) { |
|
| 238 | 238 | return SourceLocation::fromSource($source, $position); |
| 239 | 239 | }, $positions); |
| 240 | 240 | } elseif (!empty($this->nodes)) { |
| 241 | - $locations = array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
| 241 | + $locations = array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
| 242 | 242 | $location = $node->getLocation(); |
| 243 | 243 | if (null !== $location) { |
| 244 | 244 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |