@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | /** |
323 | 323 | * @return TypeNodeInterface |
324 | 324 | */ |
325 | - $parseType = function (): TypeNodeInterface { |
|
325 | + $parseType = function(): TypeNodeInterface { |
|
326 | 326 | $this->expect(TokenKindEnum::COLON); |
327 | 327 | return $this->lexType(); |
328 | 328 | }; |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | /** |
434 | 434 | * @return ArgumentNode |
435 | 435 | */ |
436 | - $parseFunction = function () use ($isConst): ArgumentNode { |
|
436 | + $parseFunction = function() use ($isConst) : ArgumentNode { |
|
437 | 437 | return $this->lexArgument($isConst); |
438 | 438 | }; |
439 | 439 | |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | /** |
461 | 461 | * @return NodeInterface|TypeNodeInterface|ValueNodeInterface |
462 | 462 | */ |
463 | - $parseValue = function () use ($isConst): NodeInterface { |
|
463 | + $parseValue = function() use ($isConst): NodeInterface { |
|
464 | 464 | $this->expect(TokenKindEnum::COLON); |
465 | 465 | return $this->lexValue($isConst); |
466 | 466 | }; |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | |
530 | 530 | $this->expectKeyword(KeywordEnum::FRAGMENT); |
531 | 531 | |
532 | - $parseTypeCondition = function () { |
|
532 | + $parseTypeCondition = function() { |
|
533 | 533 | $this->expectKeyword(KeywordEnum::ON); |
534 | 534 | return $this->lexNamedType(); |
535 | 535 | }; |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | { |
660 | 660 | $start = $this->lexer->getToken(); |
661 | 661 | |
662 | - $parseFunction = function () use ($isConst) { |
|
662 | + $parseFunction = function() use ($isConst) { |
|
663 | 663 | return $this->lexValue($isConst); |
664 | 664 | }; |
665 | 665 | |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | * @param bool $isConst |
713 | 713 | * @return NodeInterface|TypeNodeInterface|ValueNodeInterface |
714 | 714 | */ |
715 | - $parseValue = function (bool $isConst): NodeInterface { |
|
715 | + $parseValue = function(bool $isConst): NodeInterface { |
|
716 | 716 | $this->expect(TokenKindEnum::COLON); |
717 | 717 | return $this->lexValue($isConst); |
718 | 718 | }; |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | */ |
1054 | 1054 | protected function lexArgumentsDefinition(): array |
1055 | 1055 | { |
1056 | - $parseFunction = function (): InputValueDefinitionNode { |
|
1056 | + $parseFunction = function(): InputValueDefinitionNode { |
|
1057 | 1057 | return $this->lexInputValueDefinition(); |
1058 | 1058 | }; |
1059 | 1059 | |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | */ |
1260 | 1260 | protected function lexInputFieldsDefinition(): array |
1261 | 1261 | { |
1262 | - $parseFunction = function (): InputValueDefinitionNode { |
|
1262 | + $parseFunction = function(): InputValueDefinitionNode { |
|
1263 | 1263 | return $this->lexInputValueDefinition(); |
1264 | 1264 | }; |
1265 | 1265 | |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | |
1328 | 1328 | $directives = $this->lexDirectives(true); |
1329 | 1329 | |
1330 | - $parseFunction = function (): OperationTypeDefinitionNode { |
|
1330 | + $parseFunction = function(): OperationTypeDefinitionNode { |
|
1331 | 1331 | return $this->lexOperationTypeDefinition(); |
1332 | 1332 | }; |
1333 | 1333 | |
@@ -1601,7 +1601,7 @@ discard block |
||
1601 | 1601 | |
1602 | 1602 | $name = $this->lexName(); |
1603 | 1603 | |
1604 | - if (arraySome(DirectiveLocationEnum::values(), function ($value) use ($name) { |
|
1604 | + if (arraySome(DirectiveLocationEnum::values(), function($value) use ($name) { |
|
1605 | 1605 | return $name->getValue() === $value; |
1606 | 1606 | })) { |
1607 | 1607 | return $name; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function buildTypes(): array |
78 | 78 | { |
79 | - return \array_map(function (TypeSystemDefinitionNodeInterface $definition) { |
|
79 | + return \array_map(function(TypeSystemDefinitionNodeInterface $definition) { |
|
80 | 80 | return $this->definitionBuilder->buildType($definition); |
81 | 81 | }, \array_values($this->info->getTypeDefinitionMap())); |
82 | 82 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function buildDirectives(): array |
88 | 88 | { |
89 | - $directives = \array_map(function (DirectiveDefinitionNode $definition) { |
|
89 | + $directives = \array_map(function(DirectiveDefinitionNode $definition) { |
|
90 | 90 | return $this->definitionBuilder->buildDirective($definition); |
91 | 91 | }, $this->info->getDirectiveDefinitions()); |
92 | 92 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ]; |
98 | 98 | |
99 | 99 | foreach ($specifiedDirectivesMap as $name => $directive) { |
100 | - if (!arraySome($directives, function (Directive $directive) use ($name) { |
|
100 | + if (!arraySome($directives, function(Directive $directive) use ($name) { |
|
101 | 101 | return $directive->getName() === $name; |
102 | 102 | })) { |
103 | 103 | $directives[] = $directive; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | $typeMap = $this->info->getSchema()->getTypeMap(); |
140 | 140 | |
141 | - $extendedTypes = \array_map(function ($type) { |
|
141 | + $extendedTypes = \array_map(function($type) { |
|
142 | 142 | return $this->getExtendedType($type); |
143 | 143 | }, $typeMap); |
144 | 144 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | return \array_merge( |
166 | 166 | $existingDirectives, |
167 | - \array_map(function (DirectiveDefinitionNode $node) { |
|
167 | + \array_map(function(DirectiveDefinitionNode $node) { |
|
168 | 168 | return $this->definitionBuilder->buildDirective($node); |
169 | 169 | }, $this->info->getDirectiveDefinitions()) |
170 | 170 | ); |
@@ -267,10 +267,10 @@ discard block |
||
267 | 267 | return newObjectType([ |
268 | 268 | 'name' => $typeName, |
269 | 269 | 'description' => $type->getDescription(), |
270 | - 'interfaces' => function () use ($type) { |
|
270 | + 'interfaces' => function() use ($type) { |
|
271 | 271 | return $this->extendImplementedInterfaces($type); |
272 | 272 | }, |
273 | - 'fields' => function () use ($type) { |
|
273 | + 'fields' => function() use ($type) { |
|
274 | 274 | return $this->extendFieldMap($type); |
275 | 275 | }, |
276 | 276 | 'astNode' => $type->getAstNode(), |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | return newInterfaceType([ |
297 | 297 | 'name' => $typeName, |
298 | 298 | 'description' => $type->getDescription(), |
299 | - 'fields' => function () use ($type) { |
|
299 | + 'fields' => function() use ($type) { |
|
300 | 300 | return $this->extendFieldMap($type); |
301 | 301 | }, |
302 | 302 | 'astNode' => $type->getAstNode(), |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | return newUnionType([ |
327 | 327 | 'name' => $type->getName(), |
328 | 328 | 'description' => $type->getDescription(), |
329 | - 'types' => \array_map(function ($unionType) { |
|
329 | + 'types' => \array_map(function($unionType) { |
|
330 | 330 | return $this->getExtendedType($unionType); |
331 | 331 | }, $type->getTypes()), |
332 | 332 | 'astNode' => $type->getAstNode(), |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | { |
344 | 344 | $typeName = $type->getName(); |
345 | 345 | |
346 | - $interfaces = \array_map(function (InterfaceType $interface) { |
|
346 | + $interfaces = \array_map(function(InterfaceType $interface) { |
|
347 | 347 | return $this->getExtendedType($interface); |
348 | 348 | }, $type->getInterfaces()); |
349 | 349 |