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 (#851)
by Jérémiah
01:50
created
src/Annotation/Mutation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         ?string $type = null,
35 35
         ?string $resolve = null,
36 36
         ?string $complexity = null,
37
-        array|string|null $targetTypes = null
37
+        array | string | null $targetTypes = null
38 38
     ) {
39 39
         parent::__construct($name, $type, $resolve, $complexity);
40 40
         if ($targetTypes) {
Please login to merge, or discard this patch.
src/Config/Parser/MetadataParser/MetadataParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
         $buildersAnnotations = self::getMetadataMatching($metadatas, Metadata\FieldsBuilder::class);
348 348
         if (!empty($buildersAnnotations)) {
349
-            $typeConfiguration['builders'] = array_map(fn ($fieldsBuilderAnnotation) => ['builder' => $fieldsBuilderAnnotation->name, 'builderConfig' => $fieldsBuilderAnnotation->config], $buildersAnnotations);
349
+            $typeConfiguration['builders'] = array_map(fn($fieldsBuilderAnnotation) => ['builder' => $fieldsBuilderAnnotation->name, 'builderConfig' => $fieldsBuilderAnnotation->config], $buildersAnnotations);
350 350
         }
351 351
 
352 352
         if (isset($typeAnnotation->isTypeOf)) {
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
             $reflectionConstant = new ReflectionClassConstant($reflectionClass->getName(), $name);
441 441
             $valueConfig = self::getDescriptionConfiguration(static::getMetadatas($reflectionConstant), true);
442 442
 
443
-            $enumValueAnnotation = current(array_filter($enumValues, fn ($enumValueAnnotation) => $enumValueAnnotation->name === $name));
443
+            $enumValueAnnotation = current(array_filter($enumValues, fn($enumValueAnnotation) => $enumValueAnnotation->name === $name));
444 444
             $valueConfig['value'] = $value;
445 445
 
446 446
             if (false !== $enumValueAnnotation) {
Please login to merge, or discard this patch.
src/Annotation/Query.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         ?string $type = null,
35 35
         ?string $resolve = null,
36 36
         ?string $complexity = null,
37
-        array|string|null $targetTypes = null
37
+        array | string | null $targetTypes = null
38 38
     ) {
39 39
         parent::__construct($name, $type, $resolve, $complexity);
40 40
         if ($targetTypes) {
Please login to merge, or discard this patch.
tests/Functional/Security/QueryComplexityTest.php 1 patch
Spacing   -70 removed lines patch added patch discarded remove patch
@@ -9,73 +9,3 @@
 block discarded – undo
9 9
 final class QueryComplexityTest extends TestCase
10 10
 {
11 11
     private string $userFriendsWithoutLimitQuery = <<<'EOF'
12
-        query {
13
-          user {
14
-            friends {
15
-              edges {
16
-                node {
17
-                  name
18
-                }
19
-              }
20
-            }
21
-          }
22
-        }
23
-        EOF;
24
-
25
-    private string $userFriendsWithLimitQuery = <<<'EOF'
26
-        query {
27
-          user {
28
-            friends(first: 1) {
29
-              edges {
30
-                node {
31
-                  name
32
-                }
33
-              }
34
-            }
35
-          }
36
-        }
37
-        EOF;
38
-
39
-    public function testComplexityReachLimitation(): void
40
-    {
41
-        $expected = [
42
-            'errors' => [
43
-                [
44
-                    'message' => 'Max query complexity should be 10 but got 54.',
45
-                ],
46
-            ],
47
-        ];
48
-
49
-        $this->assertResponse($this->userFriendsWithoutLimitQuery, $expected, self::ANONYMOUS_USER, 'queryComplexity');
50
-    }
51
-
52
-    public function testComplexityReachLimitationEnv(): void
53
-    {
54
-        $expected = [
55
-            'errors' => [
56
-                [
57
-                    'message' => 'Max query complexity should be 10 but got 54.',
58
-                ],
59
-            ],
60
-        ];
61
-
62
-        $this->assertResponse($this->userFriendsWithoutLimitQuery, $expected, self::ANONYMOUS_USER, 'queryComplexityEnv');
63
-    }
64
-
65
-    public function testComplexityUnderLimitation(): void
66
-    {
67
-        $expected = [
68
-            'data' => [
69
-                'user' => [
70
-                    'friends' => [
71
-                        'edges' => [
72
-                            ['node' => ['name' => 'Nick']],
73
-                        ],
74
-                    ],
75
-                ],
76
-            ],
77
-        ];
78
-
79
-        $this->assertResponse($this->userFriendsWithLimitQuery, $expected, self::ANONYMOUS_USER, 'queryComplexity');
80
-    }
81
-}
Please login to merge, or discard this patch.
tests/Functional/Security/QueryMaxDepthTest.php 1 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.
tests/Functional/Security/DisableIntrospectionTest.php 1 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.
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.