Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Pull Request — master (#962)
by Ruud
01:51
created
tests/Functional/Security/QueryMaxDepthTest.php 5 patches
Indentation   -77 removed lines patch added patch discarded remove patch
@@ -9,80 +9,3 @@
 block discarded – undo
9 9
 final class QueryMaxDepthTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutViolationQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends(first:1) {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithViolationQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                  friends {
33
-                    edges {
34
-                      node {
35
-                        name
36
-                      }
37
-                    }
38
-                  }
39
-                }
40
-              }
41
-            }
42
-          }
43
-        }
44
-        EOF;
45
-
46
-    public function testMaxDepthReachLimitation(): void
47
-    {
48
-        $expected = [
49
-            'errors' => [
50
-                [
51
-                    'message' => 'Max query depth should be 3 but got 6.',
52
-                ],
53
-            ],
54
-        ];
55
-
56
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
57
-    }
58
-
59
-    public function testMaxDepthReachLimitationEnv(): void
60
-    {
61
-        $expected = [
62
-            'errors' => [
63
-                [
64
-                    'message' => 'Max query depth should be 3 but got 6.',
65
-                ],
66
-            ],
67
-        ];
68
-
69
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepthEnv');
70
-    }
71
-
72
-    public function testComplexityUnderLimitation(): void
73
-    {
74
-        $expected = [
75
-            'data' => [
76
-                'user' => [
77
-                    'friends' => [
78
-                        'edges' => [
79
-                            ['node' => ['name' => 'Nick']],
80
-                        ],
81
-                    ],
82
-                ],
83
-            ],
84
-        ];
85
-
86
-        $this->assertResponse($this->userFriendsWithoutViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
87
-    }
88
-}
Please login to merge, or discard this patch.
Switch Indentation   -77 removed lines patch added patch discarded remove patch
@@ -9,80 +9,3 @@
 block discarded – undo
9 9
 final class QueryMaxDepthTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutViolationQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends(first:1) {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithViolationQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                  friends {
33
-                    edges {
34
-                      node {
35
-                        name
36
-                      }
37
-                    }
38
-                  }
39
-                }
40
-              }
41
-            }
42
-          }
43
-        }
44
-        EOF;
45
-
46
-    public function testMaxDepthReachLimitation(): void
47
-    {
48
-        $expected = [
49
-            'errors' => [
50
-                [
51
-                    'message' => 'Max query depth should be 3 but got 6.',
52
-                ],
53
-            ],
54
-        ];
55
-
56
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
57
-    }
58
-
59
-    public function testMaxDepthReachLimitationEnv(): void
60
-    {
61
-        $expected = [
62
-            'errors' => [
63
-                [
64
-                    'message' => 'Max query depth should be 3 but got 6.',
65
-                ],
66
-            ],
67
-        ];
68
-
69
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepthEnv');
70
-    }
71
-
72
-    public function testComplexityUnderLimitation(): void
73
-    {
74
-        $expected = [
75
-            'data' => [
76
-                'user' => [
77
-                    'friends' => [
78
-                        'edges' => [
79
-                            ['node' => ['name' => 'Nick']],
80
-                        ],
81
-                    ],
82
-                ],
83
-            ],
84
-        ];
85
-
86
-        $this->assertResponse($this->userFriendsWithoutViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
87
-    }
88
-}
Please login to merge, or discard this patch.
Spacing   -77 removed lines patch added patch discarded remove patch
@@ -9,80 +9,3 @@
 block discarded – undo
9 9
 final class QueryMaxDepthTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutViolationQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends(first:1) {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithViolationQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                  friends {
33
-                    edges {
34
-                      node {
35
-                        name
36
-                      }
37
-                    }
38
-                  }
39
-                }
40
-              }
41
-            }
42
-          }
43
-        }
44
-        EOF;
45
-
46
-    public function testMaxDepthReachLimitation(): void
47
-    {
48
-        $expected = [
49
-            'errors' => [
50
-                [
51
-                    'message' => 'Max query depth should be 3 but got 6.',
52
-                ],
53
-            ],
54
-        ];
55
-
56
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
57
-    }
58
-
59
-    public function testMaxDepthReachLimitationEnv(): void
60
-    {
61
-        $expected = [
62
-            'errors' => [
63
-                [
64
-                    'message' => 'Max query depth should be 3 but got 6.',
65
-                ],
66
-            ],
67
-        ];
68
-
69
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepthEnv');
70
-    }
71
-
72
-    public function testComplexityUnderLimitation(): void
73
-    {
74
-        $expected = [
75
-            'data' => [
76
-                'user' => [
77
-                    'friends' => [
78
-                        'edges' => [
79
-                            ['node' => ['name' => 'Nick']],
80
-                        ],
81
-                    ],
82
-                ],
83
-            ],
84
-        ];
85
-
86
-        $this->assertResponse($this->userFriendsWithoutViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
87
-    }
88
-}
Please login to merge, or discard this patch.
Braces   -77 removed lines patch added patch discarded remove patch
@@ -9,80 +9,3 @@
 block discarded – undo
9 9
 final class QueryMaxDepthTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutViolationQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends(first:1) {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithViolationQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                  friends {
33
-                    edges {
34
-                      node {
35
-                        name
36
-                      }
37
-                    }
38
-                  }
39
-                }
40
-              }
41
-            }
42
-          }
43
-        }
44
-        EOF;
45
-
46
-    public function testMaxDepthReachLimitation(): void
47
-    {
48
-        $expected = [
49
-            'errors' => [
50
-                [
51
-                    'message' => 'Max query depth should be 3 but got 6.',
52
-                ],
53
-            ],
54
-        ];
55
-
56
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
57
-    }
58
-
59
-    public function testMaxDepthReachLimitationEnv(): void
60
-    {
61
-        $expected = [
62
-            'errors' => [
63
-                [
64
-                    'message' => 'Max query depth should be 3 but got 6.',
65
-                ],
66
-            ],
67
-        ];
68
-
69
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepthEnv');
70
-    }
71
-
72
-    public function testComplexityUnderLimitation(): void
73
-    {
74
-        $expected = [
75
-            'data' => [
76
-                'user' => [
77
-                    'friends' => [
78
-                        'edges' => [
79
-                            ['node' => ['name' => 'Nick']],
80
-                        ],
81
-                    ],
82
-                ],
83
-            ],
84
-        ];
85
-
86
-        $this->assertResponse($this->userFriendsWithoutViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
87
-    }
88
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -77 removed lines patch added patch discarded remove patch
@@ -9,80 +9,3 @@
 block discarded – undo
9 9
 final class QueryMaxDepthTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutViolationQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends(first:1) {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithViolationQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                  friends {
33
-                    edges {
34
-                      node {
35
-                        name
36
-                      }
37
-                    }
38
-                  }
39
-                }
40
-              }
41
-            }
42
-          }
43
-        }
44
-        EOF;
45
-
46
-    public function testMaxDepthReachLimitation(): void
47
-    {
48
-        $expected = [
49
-            'errors' => [
50
-                [
51
-                    'message' => 'Max query depth should be 3 but got 6.',
52
-                ],
53
-            ],
54
-        ];
55
-
56
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
57
-    }
58
-
59
-    public function testMaxDepthReachLimitationEnv(): void
60
-    {
61
-        $expected = [
62
-            'errors' => [
63
-                [
64
-                    'message' => 'Max query depth should be 3 but got 6.',
65
-                ],
66
-            ],
67
-        ];
68
-
69
-        $this->assertResponse($this->userFriendsWithViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepthEnv');
70
-    }
71
-
72
-    public function testComplexityUnderLimitation(): void
73
-    {
74
-        $expected = [
75
-            'data' => [
76
-                'user' => [
77
-                    'friends' => [
78
-                        'edges' => [
79
-                            ['node' => ['name' => 'Nick']],
80
-                        ],
81
-                    ],
82
-                ],
83
-            ],
84
-        ];
85
-
86
-        $this->assertResponse($this->userFriendsWithoutViolationQuery, $expected, self::ANONYMOUS_USER, 'queryMaxDepth');
87
-    }
88
-}
Please login to merge, or discard this patch.
tests/Functional/Security/DisableIntrospectionTest.php 5 patches
Indentation   -29 removed lines patch added patch discarded remove patch
@@ -9,32 +9,3 @@
 block discarded – undo
9 9
 final class DisableIntrospectionTest extends TestCase
10 10
 {
11 11
     private string $introspectionQuery = <<<'EOF'
12
-        query {
13
-          __schema {
14
-            types {
15
-              name
16
-              description
17
-            }
18
-          }
19
-        }
20
-        EOF;
21
-
22
-    public function testIntrospectionDisabled(): void
23
-    {
24
-        $expected = [
25
-            'errors' => [
26
-                [
27
-                    'message' => 'GraphQL introspection is not allowed, but the query contained __schema or __type',
28
-                    'locations' => [
29
-                        [
30
-                            'line' => 2,
31
-                            'column' => 3,
32
-                        ],
33
-                    ],
34
-                ],
35
-            ],
36
-        ];
37
-
38
-        $this->assertResponse($this->introspectionQuery, $expected, self::ANONYMOUS_USER, 'disableIntrospection');
39
-    }
40
-}
Please login to merge, or discard this patch.
Switch Indentation   -29 removed lines patch added patch discarded remove patch
@@ -9,32 +9,3 @@
 block discarded – undo
9 9
 final class DisableIntrospectionTest extends TestCase
10 10
 {
11 11
     private string $introspectionQuery = <<<'EOF'
12
-        query {
13
-          __schema {
14
-            types {
15
-              name
16
-              description
17
-            }
18
-          }
19
-        }
20
-        EOF;
21
-
22
-    public function testIntrospectionDisabled(): void
23
-    {
24
-        $expected = [
25
-            'errors' => [
26
-                [
27
-                    'message' => 'GraphQL introspection is not allowed, but the query contained __schema or __type',
28
-                    'locations' => [
29
-                        [
30
-                            'line' => 2,
31
-                            'column' => 3,
32
-                        ],
33
-                    ],
34
-                ],
35
-            ],
36
-        ];
37
-
38
-        $this->assertResponse($this->introspectionQuery, $expected, self::ANONYMOUS_USER, 'disableIntrospection');
39
-    }
40
-}
Please login to merge, or discard this patch.
Spacing   -29 removed lines patch added patch discarded remove patch
@@ -9,32 +9,3 @@
 block discarded – undo
9 9
 final class DisableIntrospectionTest extends TestCase
10 10
 {
11 11
     private string $introspectionQuery = <<<'EOF'
12
-        query {
13
-          __schema {
14
-            types {
15
-              name
16
-              description
17
-            }
18
-          }
19
-        }
20
-        EOF;
21
-
22
-    public function testIntrospectionDisabled(): void
23
-    {
24
-        $expected = [
25
-            'errors' => [
26
-                [
27
-                    'message' => 'GraphQL introspection is not allowed, but the query contained __schema or __type',
28
-                    'locations' => [
29
-                        [
30
-                            'line' => 2,
31
-                            'column' => 3,
32
-                        ],
33
-                    ],
34
-                ],
35
-            ],
36
-        ];
37
-
38
-        $this->assertResponse($this->introspectionQuery, $expected, self::ANONYMOUS_USER, 'disableIntrospection');
39
-    }
40
-}
Please login to merge, or discard this patch.
Braces   -29 removed lines patch added patch discarded remove patch
@@ -9,32 +9,3 @@
 block discarded – undo
9 9
 final class DisableIntrospectionTest extends TestCase
10 10
 {
11 11
     private string $introspectionQuery = <<<'EOF'
12
-        query {
13
-          __schema {
14
-            types {
15
-              name
16
-              description
17
-            }
18
-          }
19
-        }
20
-        EOF;
21
-
22
-    public function testIntrospectionDisabled(): void
23
-    {
24
-        $expected = [
25
-            'errors' => [
26
-                [
27
-                    'message' => 'GraphQL introspection is not allowed, but the query contained __schema or __type',
28
-                    'locations' => [
29
-                        [
30
-                            'line' => 2,
31
-                            'column' => 3,
32
-                        ],
33
-                    ],
34
-                ],
35
-            ],
36
-        ];
37
-
38
-        $this->assertResponse($this->introspectionQuery, $expected, self::ANONYMOUS_USER, 'disableIntrospection');
39
-    }
40
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -29 removed lines patch added patch discarded remove patch
@@ -9,32 +9,3 @@
 block discarded – undo
9 9
 final class DisableIntrospectionTest extends TestCase
10 10
 {
11 11
     private string $introspectionQuery = <<<'EOF'
12
-        query {
13
-          __schema {
14
-            types {
15
-              name
16
-              description
17
-            }
18
-          }
19
-        }
20
-        EOF;
21
-
22
-    public function testIntrospectionDisabled(): void
23
-    {
24
-        $expected = [
25
-            'errors' => [
26
-                [
27
-                    'message' => 'GraphQL introspection is not allowed, but the query contained __schema or __type',
28
-                    'locations' => [
29
-                        [
30
-                            'line' => 2,
31
-                            'column' => 3,
32
-                        ],
33
-                    ],
34
-                ],
35
-            ],
36
-        ];
37
-
38
-        $this->assertResponse($this->introspectionQuery, $expected, self::ANONYMOUS_USER, 'disableIntrospection');
39
-    }
40
-}
Please login to merge, or discard this patch.
src/Validator/ValidationNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     private ?ResolverArgs $__resolverArgs;
47 47
 
48 48
     public function __construct(
49
-        ObjectType|InputObjectType $type,
49
+        ObjectType | InputObjectType $type,
50 50
         string $field = null,
51 51
         ?ValidationNode $parent = null,
52 52
         ?ResolverArgs $resolverArgs = null
Please login to merge, or discard this patch.
src/EventListener/TypeDecoratorListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->decorateObjectTypeFields($type, $fieldsResolved, $resolverMap);
88 88
     }
89 89
 
90
-    private function decorateInterfaceOrUnionType(InterfaceType|UnionType $type, ResolverMapInterface $resolverMap): void
90
+    private function decorateInterfaceOrUnionType(InterfaceType | UnionType $type, ResolverMapInterface $resolverMap): void
91 91
     {
92 92
         $this->configTypeMapping($type, ResolverMapInterface::RESOLVE_TYPE, $resolverMap);
93 93
         $covered = $resolverMap->covered($type->name);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $type->config['fields'] = is_callable($fields) ? $decoratedFields : $decoratedFields();
189 189
     }
190 190
 
191
-    private function configTypeMapping(ObjectType|InterfaceType|UnionType|CustomScalarType $type, string $fieldName, ResolverMapInterface $resolverMap): void
191
+    private function configTypeMapping(ObjectType | InterfaceType | UnionType | CustomScalarType $type, string $fieldName, ResolverMapInterface $resolverMap): void
192 192
     {
193 193
         if ($resolverMap->isResolvable($type->name, $fieldName)) {
194 194
             $type->config[substr($fieldName, 2)] = $resolverMap->resolve($type->name, $fieldName);
Please login to merge, or discard this patch.
src/Validator/InputValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'] ?? []);
Please login to merge, or discard this patch.
tests/Resolver/TypeResolverTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/EventListener/TypeDecoratorListenerTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/Definition/Type/CustomScalarTypeTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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));
Please login to merge, or discard this patch.