We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * @throws ArgumentsValidationException |
64 | 64 | */ |
65 | - public function validate(string|array|null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
65 | + public function validate(string | array | null $groups = null, bool $throw = true): ?ConstraintViolationListInterface |
|
66 | 66 | { |
67 | 67 | $rootNode = new ValidationNode( |
68 | 68 | $this->info->parentType, |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | return $rootObject; |
207 | 207 | } |
208 | 208 | |
209 | - private static function isListOfType(GeneratedTypeInterface|ListOfType|NonNull $type): bool |
|
209 | + private static function isListOfType(GeneratedTypeInterface | ListOfType | NonNull $type): bool |
|
210 | 210 | { |
211 | 211 | if ($type instanceof ListOfType || ($type instanceof NonNull && $type->getWrappedType() instanceof ListOfType)) { |
212 | 212 | return true; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | return false; |
216 | 216 | } |
217 | 217 | |
218 | - private function createCollectionNode(array $values, ObjectType|InputObjectType $type, ValidationNode $parent): array |
|
218 | + private function createCollectionNode(array $values, ObjectType | InputObjectType $type, ValidationNode $parent): array |
|
219 | 219 | { |
220 | 220 | $collection = []; |
221 | 221 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | return $collection; |
227 | 227 | } |
228 | 228 | |
229 | - private function createObjectNode(array $value, ObjectType|InputObjectType $type, ValidationNode $parent): ValidationNode |
|
229 | + private function createObjectNode(array $value, ObjectType | InputObjectType $type, ValidationNode $parent): ValidationNode |
|
230 | 230 | { |
231 | 231 | /** @phpstan-ignore-next-line */ |
232 | 232 | $classValidation = static::normalizeConfig($type->config['validation'] ?? []); |
@@ -18,8 +18,8 @@ |
||
18 | 18 | protected function getResolverSolutionsMapping(): array |
19 | 19 | { |
20 | 20 | return [ |
21 | - 'Toto' => ['factory' => fn () => new ObjectType(['name' => 'Toto', 'fields' => []]), 'aliases' => ['foo']], |
|
22 | - 'Tata' => ['factory' => fn () => new ObjectType(['name' => 'Tata', 'fields' => []]), 'aliases' => ['bar']], |
|
21 | + 'Toto' => ['factory' => fn() => new ObjectType(['name' => 'Toto', 'fields' => []]), 'aliases' => ['foo']], |
|
22 | + 'Tata' => ['factory' => fn() => new ObjectType(['name' => 'Tata', 'fields' => []]), 'aliases' => ['bar']], |
|
23 | 23 | ]; |
24 | 24 | } |
25 | 25 |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @dataProvider specialTypeFieldProvider |
33 | 33 | */ |
34 | - public function testSpecialField($fieldName, ObjectType|UnionType|InterfaceType|CustomScalarType $typeWithSpecialField, callable $fieldValueRetriever = null, $strict = true): void |
|
34 | + public function testSpecialField($fieldName, ObjectType | UnionType | InterfaceType | CustomScalarType $typeWithSpecialField, callable $fieldValueRetriever = null, $strict = true): void |
|
35 | 35 | { |
36 | 36 | if (null === $fieldValueRetriever) { |
37 | - $fieldValueRetriever = fn (ObjectType|UnionType|InterfaceType|CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
37 | + $fieldValueRetriever = fn(ObjectType | UnionType | InterfaceType | CustomScalarType $type, $fieldName) => $type->config[$fieldName]; |
|
38 | 38 | } |
39 | 39 | $expected = static function (): void { |
40 | 40 | }; |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | ]; |
68 | 68 | }, |
69 | 69 | ]); |
70 | - $barResolver = static fn () => 'bar'; |
|
71 | - $bazResolver = static fn () => 'baz'; |
|
70 | + $barResolver = static fn() => 'bar'; |
|
71 | + $bazResolver = static fn() => 'baz'; |
|
72 | 72 | |
73 | 73 | $this->decorate( |
74 | 74 | [$objectType->name => $objectType], |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | [$objectType->name => $objectType], |
104 | 104 | [ |
105 | 105 | $objectType->name => [ |
106 | - 'bar' => fn ($value, $args) => $args, |
|
106 | + 'bar' => fn($value, $args) => $args, |
|
107 | 107 | ], |
108 | 108 | ] |
109 | 109 | ); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | [ |
254 | 254 | ResolverMapInterface::RESOLVE_FIELD, |
255 | 255 | $objectWithResolveField, |
256 | - fn (ObjectType $type) => $type->resolveFieldFn, |
|
256 | + fn(ObjectType $type) => $type->resolveFieldFn, |
|
257 | 257 | false, |
258 | 258 | ], |
259 | 259 | [ResolverMapInterface::RESOLVE_FIELD, $objectWithResolveField, null, false], |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | // custom scalar |
264 | 264 | [ResolverMapInterface::SERIALIZE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => ''])], |
265 | 265 | [ResolverMapInterface::PARSE_VALUE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '', 'parseValue' => fn(mixed $input): mixed => ''])], |
266 | - [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '', 'parseLiteral' => fn(Node $a, array|null $b): mixed => ''])], |
|
266 | + [ResolverMapInterface::PARSE_LITERAL, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => '', 'parseLiteral' => fn(Node $a, array | null $b): mixed => ''])], |
|
267 | 267 | [ResolverMapInterface::SCALAR_TYPE, new CustomScalarType(['name' => 'Custom', 'scalarType' => Type::string(), 'serialize' => fn(mixed $input): mixed => ''])], |
268 | 268 | ]; |
269 | 269 | } |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | public function testScalarTypeConfig(): void |
24 | 24 | { |
25 | 25 | $this->assertScalarTypeConfig(new YearScalarType()); |
26 | - $this->assertScalarTypeConfig(fn () => new YearScalarType()); |
|
26 | + $this->assertScalarTypeConfig(fn() => new YearScalarType()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testWithoutScalarTypeConfig(): void |
30 | 30 | { |
31 | - $genericFunc = fn ($value) => $value; |
|
31 | + $genericFunc = fn($value) => $value; |
|
32 | 32 | /** @phpstan-ignore-next-line */ |
33 | 33 | $type = new CustomScalarType([ |
34 | 34 | 'serialize' => $genericFunc, |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | yield [false, 'false']; |
68 | 68 | yield [new stdClass(), 'instance of stdClass']; |
69 | 69 | yield [ |
70 | - fn () => false, |
|
70 | + fn() => false, |
|
71 | 71 | 'false', |
72 | 72 | ]; |
73 | 73 | yield [ |
74 | - fn () => new stdClass(), |
|
74 | + fn() => new stdClass(), |
|
75 | 75 | 'instance of stdClass', |
76 | 76 | ]; |
77 | 77 | } |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | { |
86 | 86 | $type = new CustomScalarType([ |
87 | 87 | 'scalarType' => $scalarType, |
88 | - 'serialize' => fn () => 'serialize', |
|
89 | - 'parseValue' => fn () => 'parseValue', |
|
90 | - 'parseLiteral' => fn () => 'parseLiteral', |
|
88 | + 'serialize' => fn() => 'serialize', |
|
89 | + 'parseValue' => fn() => 'parseValue', |
|
90 | + 'parseLiteral' => fn() => 'parseLiteral', |
|
91 | 91 | ]); |
92 | 92 | |
93 | 93 | $this->assertSame('50 AC', $type->serialize(50)); |