@@ -370,7 +370,7 @@ |
||
370 | 370 | */ |
371 | 371 | protected function printMany(array $nodes): array |
372 | 372 | { |
373 | - return \array_map(function ($node) { |
|
373 | + return \array_map(function($node) { |
|
374 | 374 | return $this->print($node); |
375 | 375 | }, $nodes); |
376 | 376 | } |
@@ -36,8 +36,8 @@ |
||
36 | 36 | return false; |
37 | 37 | } |
38 | 38 | |
39 | - return arrayEvery($argumentsA, function (ArgumentNode $argumentA) use ($argumentsB) { |
|
40 | - $argumentB = find($argumentsB, function (ArgumentNode $argument) use ($argumentA) { |
|
39 | + return arrayEvery($argumentsA, function(ArgumentNode $argumentA) use ($argumentsB) { |
|
40 | + $argumentB = find($argumentsB, function(ArgumentNode $argument) use ($argumentA) { |
|
41 | 41 | return $argument->getNameValue() === $argumentA->getNameValue(); |
42 | 42 | }); |
43 | 43 |
@@ -179,7 +179,7 @@ |
||
179 | 179 | $values = []; |
180 | 180 | |
181 | 181 | /** @var ObjectFieldNode[] $fieldNodes */ |
182 | - $fieldNodes = keyMap($node->getFields(), function (ObjectFieldNode $value) { |
|
182 | + $fieldNodes = keyMap($node->getFields(), function(ObjectFieldNode $value) { |
|
183 | 183 | return $value->getNameValue(); |
184 | 184 | }); |
185 | 185 |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | |
47 | 47 | return $this->printFilteredSchema( |
48 | 48 | $schema, |
49 | - function (Directive $directive): bool { |
|
49 | + function(Directive $directive): bool { |
|
50 | 50 | return !isSpecifiedDirective($directive); |
51 | 51 | }, |
52 | - function (TypeInterface $type): bool { |
|
52 | + function(TypeInterface $type): bool { |
|
53 | 53 | return !isSpecifiedScalarType($type) && !isIntrospectionType($type); |
54 | 54 | } |
55 | 55 | ); |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | |
67 | 67 | return $this->printFilteredSchema( |
68 | 68 | $schema, |
69 | - function (Directive $directive): bool { |
|
69 | + function(Directive $directive): bool { |
|
70 | 70 | return isSpecifiedDirective($directive); |
71 | 71 | }, |
72 | - function (TypeInterface $type): bool { |
|
72 | + function(TypeInterface $type): bool { |
|
73 | 73 | return isIntrospectionType($type); |
74 | 74 | } |
75 | 75 | ); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | $types = \array_filter(\array_values($schema->getTypeMap()), $filter); |
137 | 137 | |
138 | - \usort($types, function (NamedTypeInterface $typeA, NamedTypeInterface $typeB) { |
|
138 | + \usort($types, function(NamedTypeInterface $typeA, NamedTypeInterface $typeB) { |
|
139 | 139 | return \strcasecmp($typeA->getName(), $typeB->getName()); |
140 | 140 | }); |
141 | 141 | |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | $description = $this->printDescription($type); |
262 | 262 | $name = $type->getName(); |
263 | 263 | $implements = $type->hasInterfaces() |
264 | - ? ' implements ' . printArray(' & ', \array_map(function (InterfaceType $interface) { |
|
264 | + ? ' implements ' . printArray(' & ', \array_map(function(InterfaceType $interface) { |
|
265 | 265 | return $interface->getName(); |
266 | 266 | }, $type->getInterfaces())) |
267 | 267 | : ''; |
268 | - $fields = $this->printFields($type->getFields()); |
|
268 | + $fields = $this->printFields($type->getFields()); |
|
269 | 269 | |
270 | 270 | return printLines([ |
271 | 271 | $description, |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | protected function printEnumValues(array $values): string |
331 | 331 | { |
332 | - return printLines(\array_map(function (EnumValue $value, int $i): string { |
|
332 | + return printLines(\array_map(function(EnumValue $value, int $i): string { |
|
333 | 333 | $description = $this->printDescription($value, ' ', 0 === $i); |
334 | 334 | $name = $value->getName(); |
335 | 335 | $deprecated = $this->printDeprecated($value); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | protected function printInputObjectType(InputObjectType $type): string |
349 | 349 | { |
350 | 350 | $description = $this->printDescription($type); |
351 | - $fields = \array_map(function (InputField $field, int $i): string { |
|
351 | + $fields = \array_map(function(InputField $field, int $i): string { |
|
352 | 352 | $description = $this->printDescription($field, ' ', 0 === $i); |
353 | 353 | $inputValue = $this->printInputValue($field); |
354 | 354 | return printLines([ |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | protected function printFields(array $fields): string |
388 | 388 | { |
389 | - return printLines(\array_map(function (Field $field): string { |
|
389 | + return printLines(\array_map(function(Field $field): string { |
|
390 | 390 | $description = $this->printDescription($field); |
391 | 391 | $name = $field->getName(); |
392 | 392 | $arguments = $this->printArguments($field->getArguments()); |
@@ -406,15 +406,15 @@ discard block |
||
406 | 406 | } |
407 | 407 | |
408 | 408 | // If every arg does not have a description, print them on one line. |
409 | - if (arrayEvery($arguments, function (Argument $argument): bool { |
|
409 | + if (arrayEvery($arguments, function(Argument $argument): bool { |
|
410 | 410 | return !$argument->hasDescription(); |
411 | 411 | })) { |
412 | - return printInputFields(\array_map(function (Argument $argument) { |
|
412 | + return printInputFields(\array_map(function(Argument $argument) { |
|
413 | 413 | return $this->printInputValue($argument); |
414 | 414 | }, $arguments)); |
415 | 415 | } |
416 | 416 | |
417 | - $args = \array_map(function (Argument $argument) use ($indentation) { |
|
417 | + $args = \array_map(function(Argument $argument) use ($indentation) { |
|
418 | 418 | $description = $this->printDescription($argument); |
419 | 419 | $inputValue = $this->printInputValue($argument); |
420 | 420 | return printLines([ |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | */ |
535 | 535 | protected function printMany(array $definitions): array |
536 | 536 | { |
537 | - return \array_map(function ($definition) { |
|
537 | + return \array_map(function($definition) { |
|
538 | 538 | return $this->print($definition); |
539 | 539 | }, $definitions); |
540 | 540 | } |