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:47
created
src/DependencyInjection/Compiler/IdentifyCallbackServiceIdsPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
                 $alias = $container->getAlias($id);
72 72
                 $id = (string) $alias;
73 73
                 $definition = $container->getDefinition($id);
74
-            } catch (ServiceNotFoundException|InvalidArgumentException $e) {
74
+            } catch (ServiceNotFoundException | InvalidArgumentException $e) {
75 75
                 if ($throw) {
76 76
                     throw $e;
77 77
                 }
Please login to merge, or discard this patch.
tests/EventListener/TypeDecoratorListenerTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         );
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Config/TypeDefinition.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $node
43 43
             ->isRequired()
44 44
             ->validate()
45
-                ->ifTrue(fn ($name) => !preg_match('/^[_a-z][_0-9a-z]*$/i', $name))
45
+                ->ifTrue(fn($name) => !preg_match('/^[_a-z][_0-9a-z]*$/i', $name))
46 46
                 ->thenInvalid('Invalid type name "%s". (see http://spec.graphql.org/June2018/#sec-Names)')
47 47
             ->end()
48 48
         ;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $node
159 159
             ->beforeNormalization()
160
-                ->ifTrue(fn ($options) => !empty($options[$old]) && empty($options[$new]))
160
+                ->ifTrue(fn($options) => !empty($options[$old]) && empty($options[$new]))
161 161
                 ->then(function ($options) use ($old, $new) {
162 162
                     if (is_callable($options[$old])) {
163 163
                         if (is_array($options[$old])) {
@@ -167,8 +167,7 @@  discard block
 block discarded – undo
167 167
                         }
168 168
                     } elseif (is_string($options[$old])) {
169 169
                         $options[$new]['expression'] = ExpressionLanguage::stringHasTrigger($options[$old]) ?
170
-                            ExpressionLanguage::unprefixExpression($options[$old]) :
171
-                            json_encode($options[$old]);
170
+                            ExpressionLanguage::unprefixExpression($options[$old]) : json_encode($options[$old]);
172 171
                     } else {
173 172
                         $options[$new]['expression'] = json_encode($options[$old]);
174 173
                     }
@@ -177,7 +176,7 @@  discard block
 block discarded – undo
177 176
                 })
178 177
             ->end()
179 178
             ->beforeNormalization()
180
-                ->ifTrue(fn ($options) => is_array($options) && array_key_exists($old, $options))
179
+                ->ifTrue(fn($options) => is_array($options) && array_key_exists($old, $options))
181 180
                 ->then(function ($options) use ($old) {
182 181
                     unset($options[$old]);
183 182
 
@@ -185,7 +184,7 @@  discard block
 block discarded – undo
185 184
                 })
186 185
             ->end()
187 186
             ->validate()
188
-                ->ifTrue(fn (array $v) => !empty($v[$new]) && !empty($v[$old]))
187
+                ->ifTrue(fn(array $v) => !empty($v[$new]) && !empty($v[$old]))
189 188
                 ->thenInvalid(sprintf(
190 189
                     '"%s" and "%s" should not be used together in "%%s".',
191 190
                     $new,
@@ -203,17 +202,17 @@  discard block
 block discarded – undo
203 202
         $node
204 203
             ->info($info)
205 204
             ->validate()
206
-                ->ifTrue(fn (array $v) => !empty($v['method']) && !empty($v['expression']))
205
+                ->ifTrue(fn(array $v) => !empty($v['method']) && !empty($v['expression']))
207 206
                 ->thenInvalid('"method" and "expression" should not be use together.')
208 207
             ->end()
209 208
             ->beforeNormalization()
210 209
                 // Allow short syntax
211
-                ->ifTrue(fn ($options) => is_string($options) && ExpressionLanguage::stringHasTrigger($options))
212
-                ->then(fn ($options) => ['expression' => ExpressionLanguage::unprefixExpression($options)])
210
+                ->ifTrue(fn($options) => is_string($options) && ExpressionLanguage::stringHasTrigger($options))
211
+                ->then(fn($options) => ['expression' => ExpressionLanguage::unprefixExpression($options)])
213 212
             ->end()
214 213
             ->beforeNormalization()
215
-                ->ifTrue(fn ($options) => is_string($options) && !ExpressionLanguage::stringHasTrigger($options))
216
-                ->then(fn ($options) => ['method' => $options])
214
+                ->ifTrue(fn($options) => is_string($options) && !ExpressionLanguage::stringHasTrigger($options))
215
+                ->then(fn($options) => ['method' => $options])
217 216
             ->end()
218 217
             ->children()
219 218
                 ->scalarNode('method')->end()
Please login to merge, or discard this patch.