We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $this->decorateObjectTypeFields($type, $fieldsResolved, $resolverMap); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - private function decorateInterfaceOrUnionType(InterfaceType|UnionType $type, ResolverMapInterface $resolverMap): void |
|
| 91 | + private function decorateInterfaceOrUnionType(InterfaceType | UnionType $type, ResolverMapInterface $resolverMap): void |
|
| 92 | 92 | { |
| 93 | 93 | $this->configTypeMapping($type, ResolverMapInterface::RESOLVE_TYPE, $resolverMap); |
| 94 | 94 | $covered = $resolverMap->covered($type->name); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | $values = $type->config['values']; |
| 140 | 140 | |
| 141 | - $decoratedValues = function() use ($type, $resolverMap, $values) { |
|
| 141 | + $decoratedValues = function () use ($type, $resolverMap, $values) { |
|
| 142 | 142 | if (is_callable($values)) { |
| 143 | 143 | $values = $values(); |
| 144 | 144 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | $type->config['fields'] = is_callable($fields) ? $decoratedFields : $decoratedFields(); |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - private function configTypeMapping(ObjectType|InterfaceType|UnionType|CustomScalarType $type, string $fieldName, ResolverMapInterface $resolverMap): void |
|
| 213 | + private function configTypeMapping(ObjectType | InterfaceType | UnionType | CustomScalarType $type, string $fieldName, ResolverMapInterface $resolverMap): void |
|
| 214 | 214 | { |
| 215 | 215 | if ($resolverMap->isResolvable($type->name, $fieldName)) { |
| 216 | 216 | $type->config[substr($fieldName, 2)] = $resolverMap->resolve($type->name, $fieldName); |
@@ -32,10 +32,10 @@ discard block |
||
| 32 | 32 | * |
| 33 | 33 | * @dataProvider specialTypeFieldProvider |
| 34 | 34 | */ |
| 35 | - public function testSpecialField($fieldName, ObjectType|UnionType|InterfaceType|CustomScalarType $typeWithSpecialField, callable $fieldValueRetriever = null, $strict = true): void |
|
| 35 | + public function testSpecialField($fieldName, ObjectType | UnionType | InterfaceType | CustomScalarType $typeWithSpecialField, callable $fieldValueRetriever = null, $strict = true): void |
|
| 36 | 36 | { |
| 37 | 37 | if (null === $fieldValueRetriever) { |
| 38 | - $fieldValueRetriever = fn (ObjectType|UnionType|InterfaceType|CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
| 38 | + $fieldValueRetriever = fn(ObjectType | UnionType | InterfaceType | CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
| 39 | 39 | } |
| 40 | 40 | $expected = static function (): void { |
| 41 | 41 | }; |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | yield 'toto' => ['type' => Type::boolean(), 'resolve' => null]; |
| 67 | 67 | }, |
| 68 | 68 | ]); |
| 69 | - $barResolver = static fn () => 'bar'; |
|
| 70 | - $bazResolver = static fn () => 'baz'; |
|
| 69 | + $barResolver = static fn() => 'bar'; |
|
| 70 | + $bazResolver = static fn() => 'baz'; |
|
| 71 | 71 | |
| 72 | 72 | $this->decorate( |
| 73 | 73 | [$objectType->name => $objectType], |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | [$objectType->name => $objectType], |
| 103 | 103 | [ |
| 104 | 104 | $objectType->name => [ |
| 105 | - 'bar' => fn ($value, $args) => $args, |
|
| 105 | + 'bar' => fn($value, $args) => $args, |
|
| 106 | 106 | ], |
| 107 | 107 | ] |
| 108 | 108 | ); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | { |
| 146 | 146 | $enumType = new EnumType([ |
| 147 | 147 | 'name' => 'Foo', |
| 148 | - 'values' => function() : iterable { |
|
| 148 | + 'values' => function () : iterable { |
|
| 149 | 149 | yield 'BAR' => ['name' => 'BAR', 'value' => 'BAR']; |
| 150 | 150 | yield 'BAZ' => ['name' => 'BAZ', 'value' => 'BAZ']; |
| 151 | 151 | yield 'TOTO' => ['name' => 'TOTO', 'value' => 'TOTO']; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | public function testCustomScalarTypeUnknownField(): void |
| 222 | 222 | { |
| 223 | - $customScalarType = new CustomScalarType(['name' => 'Foo', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '']); |
|
| 223 | + $customScalarType = new CustomScalarType(['name' => 'Foo', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '']); |
|
| 224 | 224 | $this->assertDecorateException( |
| 225 | 225 | [$customScalarType->name => $customScalarType], |
| 226 | 226 | [ |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | public function specialTypeFieldProvider(): array |
| 274 | 274 | { |
| 275 | - $objectWithResolveField = new ObjectType(['name' => 'Bar', 'fields' => [], 'resolveField' => fn () => '']); |
|
| 275 | + $objectWithResolveField = new ObjectType(['name' => 'Bar', 'fields' => [], 'resolveField' => fn() => '']); |
|
| 276 | 276 | |
| 277 | 277 | return [ |
| 278 | 278 | // isTypeOf |
@@ -281,18 +281,18 @@ discard block |
||
| 281 | 281 | [ |
| 282 | 282 | ResolverMapInterface::RESOLVE_FIELD, |
| 283 | 283 | $objectWithResolveField, |
| 284 | - fn (ObjectType $type) => $type->resolveFieldFn, |
|
| 284 | + fn(ObjectType $type) => $type->resolveFieldFn, |
|
| 285 | 285 | false, |
| 286 | 286 | ], |
| 287 | 287 | [ResolverMapInterface::RESOLVE_FIELD, $objectWithResolveField, null, false], |
| 288 | 288 | // resolveType |
| 289 | - [ResolverMapInterface::RESOLVE_TYPE, new UnionType(['name' => 'Baz', 'resolveType' => fn () => '', 'types' => []])], |
|
| 290 | - [ResolverMapInterface::RESOLVE_TYPE, new InterfaceType(['name' => 'Baz', 'fields' => [], 'resolveType' => fn (mixed $objectValue, mixed $context, ResolveInfo $resolveInfo): string => ''])], |
|
| 289 | + [ResolverMapInterface::RESOLVE_TYPE, new UnionType(['name' => 'Baz', 'resolveType' => fn() => '', 'types' => []])], |
|
| 290 | + [ResolverMapInterface::RESOLVE_TYPE, new InterfaceType(['name' => 'Baz', 'fields' => [], 'resolveType' => fn(mixed $objectValue, mixed $context, ResolveInfo $resolveInfo): string => ''])], |
|
| 291 | 291 | // custom scalar |
| 292 | - [ResolverMapInterface::SERIALIZE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => ''])], |
|
| 293 | - [ResolverMapInterface::PARSE_VALUE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '', 'parseValue' => fn (mixed $input): mixed => ''])], |
|
| 294 | - [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => '', 'parseLiteral' => fn (Node $a, array|null $b): mixed => ''])], |
|
| 295 | - [ResolverMapInterface::SCALAR_TYPE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn (mixed $input): mixed => ''])], |
|
| 292 | + [ResolverMapInterface::SERIALIZE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => ''])], |
|
| 293 | + [ResolverMapInterface::PARSE_VALUE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '', 'parseValue' => fn(mixed $input): mixed => ''])], |
|
| 294 | + [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '', 'parseLiteral' => fn(Node $a, array | null $b): mixed => ''])], |
|
| 295 | + [ResolverMapInterface::SCALAR_TYPE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => ''])], |
|
| 296 | 296 | ]; |
| 297 | 297 | } |
| 298 | 298 | |