GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch utils-cs (6e2982)
by Šimon
03:40
created
src/Type/Introspection.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -331,48 +331,48 @@
 block discarded – undo
331 331
                         'description' => 'Location adjacent to an inline fragment.'
332 332
                     ],
333 333
                     'SCHEMA' => [
334
-                      'value' => DirectiveLocation::SCHEMA,
335
-                      'description' =>  'Location adjacent to a schema definition.'
334
+                        'value' => DirectiveLocation::SCHEMA,
335
+                        'description' =>  'Location adjacent to a schema definition.'
336 336
                     ],
337 337
                     'SCALAR' => [
338
-                      'value' => DirectiveLocation::SCALAR,
339
-                      'description' =>  'Location adjacent to a scalar definition.'
338
+                        'value' => DirectiveLocation::SCALAR,
339
+                        'description' =>  'Location adjacent to a scalar definition.'
340 340
                     ],
341 341
                     'OBJECT' => [
342
-                      'value' => DirectiveLocation::OBJECT,
343
-                      'description' =>  'Location adjacent to an object type definition.'
342
+                        'value' => DirectiveLocation::OBJECT,
343
+                        'description' =>  'Location adjacent to an object type definition.'
344 344
                     ],
345 345
                     'FIELD_DEFINITION' => [
346
-                      'value' => DirectiveLocation::FIELD_DEFINITION,
347
-                      'description' =>  'Location adjacent to a field definition.'
346
+                        'value' => DirectiveLocation::FIELD_DEFINITION,
347
+                        'description' =>  'Location adjacent to a field definition.'
348 348
                     ],
349 349
                     'ARGUMENT_DEFINITION' => [
350
-                      'value' => DirectiveLocation::ARGUMENT_DEFINITION,
351
-                      'description' =>  'Location adjacent to an argument definition.'
350
+                        'value' => DirectiveLocation::ARGUMENT_DEFINITION,
351
+                        'description' =>  'Location adjacent to an argument definition.'
352 352
                     ],
353 353
                     'INTERFACE' => [
354
-                      'value' => DirectiveLocation::IFACE,
355
-                      'description' =>  'Location adjacent to an interface definition.'
354
+                        'value' => DirectiveLocation::IFACE,
355
+                        'description' =>  'Location adjacent to an interface definition.'
356 356
                     ],
357 357
                     'UNION' => [
358
-                      'value' => DirectiveLocation::UNION,
359
-                      'description' =>  'Location adjacent to a union definition.'
358
+                        'value' => DirectiveLocation::UNION,
359
+                        'description' =>  'Location adjacent to a union definition.'
360 360
                     ],
361 361
                     'ENUM' => [
362
-                      'value' => DirectiveLocation::ENUM,
363
-                      'description' =>  'Location adjacent to an enum definition.'
362
+                        'value' => DirectiveLocation::ENUM,
363
+                        'description' =>  'Location adjacent to an enum definition.'
364 364
                     ],
365 365
                     'ENUM_VALUE' => [
366
-                      'value' => DirectiveLocation::ENUM_VALUE,
367
-                      'description' =>  'Location adjacent to an enum value definition.'
366
+                        'value' => DirectiveLocation::ENUM_VALUE,
367
+                        'description' =>  'Location adjacent to an enum value definition.'
368 368
                     ],
369 369
                     'INPUT_OBJECT' => [
370
-                      'value' => DirectiveLocation::INPUT_OBJECT,
371
-                      'description' =>  'Location adjacent to an input object type definition.'
370
+                        'value' => DirectiveLocation::INPUT_OBJECT,
371
+                        'description' =>  'Location adjacent to an input object type definition.'
372 372
                     ],
373 373
                     'INPUT_FIELD_DEFINITION' => [
374
-                      'value' => DirectiveLocation::INPUT_FIELD_DEFINITION,
375
-                      'description' =>  'Location adjacent to an input object field definition.'
374
+                        'value' => DirectiveLocation::INPUT_FIELD_DEFINITION,
375
+                        'description' =>  'Location adjacent to an input object field definition.'
376 376
                     ]
377 377
 
378 378
                 ]
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         if (is_bool($options)) {
51 51
             trigger_error(
52
-                'Calling Introspection::getIntrospectionQuery(boolean) is deprecated. '.
52
+                'Calling Introspection::getIntrospectionQuery(boolean) is deprecated. ' .
53 53
                 'Please use Introspection::getIntrospectionQuery(["descriptions" => boolean]).',
54 54
                 E_USER_DEPRECATED
55 55
             );
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
                     'types' => [
193 193
                         'description' => 'A list of all types supported by this server.',
194 194
                         'type' => new NonNull(new ListOfType(new NonNull(self::_type()))),
195
-                        'resolve' => function (Schema $schema) {
195
+                        'resolve' => function(Schema $schema) {
196 196
                             return array_values($schema->getTypeMap());
197 197
                         }
198 198
                     ],
199 199
                     'queryType' => [
200 200
                         'description' => 'The type that query operations will be rooted at.',
201 201
                         'type' => new NonNull(self::_type()),
202
-                        'resolve' => function (Schema $schema) {
202
+                        'resolve' => function(Schema $schema) {
203 203
                             return $schema->getQueryType();
204 204
                         }
205 205
                     ],
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
                             'If this server supports mutation, the type that ' .
209 209
                             'mutation operations will be rooted at.',
210 210
                         'type' => self::_type(),
211
-                        'resolve' => function (Schema $schema) {
211
+                        'resolve' => function(Schema $schema) {
212 212
                             return $schema->getMutationType();
213 213
                         }
214 214
                     ],
215 215
                     'subscriptionType' => [
216 216
                         'description' => 'If this server support subscription, the type that subscription operations will be rooted at.',
217 217
                         'type'        => self::_type(),
218
-                        'resolve'     => function (Schema $schema) {
218
+                        'resolve'     => function(Schema $schema) {
219 219
                             return $schema->getSubscriptionType();
220 220
                         },
221 221
                     ],
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                     ],
255 255
                     'args' => [
256 256
                         'type' => Type::nonNull(Type::listOf(Type::nonNull(self::_inputValue()))),
257
-                        'resolve' => function (Directive $directive) {
257
+                        'resolve' => function(Directive $directive) {
258 258
                             return $directive->args ?: [];
259 259
                         }
260 260
                     ],
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                 'description' =>
391 391
                     'The fundamental unit of any GraphQL Schema is the type. There are ' .
392 392
                     'many kinds of types in GraphQL as represented by the `__TypeKind` enum.' .
393
-                    "\n\n".
393
+                    "\n\n" .
394 394
                     'Depending on the kind of a type, certain fields describe ' .
395 395
                     'information about that type. Scalar types provide no information ' .
396 396
                     'beyond a name and description, while Enum types provide their values. ' .
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
                     return [
402 402
                         'kind' => [
403 403
                             'type' => Type::nonNull(self::_typeKind()),
404
-                            'resolve' => function (Type $type) {
404
+                            'resolve' => function(Type $type) {
405 405
                                 switch (true) {
406 406
                                     case $type instanceof ListOfType:
407 407
                                         return TypeKind::LIST_KIND;
@@ -431,12 +431,12 @@  discard block
 block discarded – undo
431 431
                             'args' => [
432 432
                                 'includeDeprecated' => ['type' => Type::boolean(), 'defaultValue' => false]
433 433
                             ],
434
-                            'resolve' => function (Type $type, $args) {
434
+                            'resolve' => function(Type $type, $args) {
435 435
                                 if ($type instanceof ObjectType || $type instanceof InterfaceType) {
436 436
                                     $fields = $type->getFields();
437 437
 
438 438
                                     if (empty($args['includeDeprecated'])) {
439
-                                        $fields = array_filter($fields, function (FieldDefinition $field) {
439
+                                        $fields = array_filter($fields, function(FieldDefinition $field) {
440 440
                                             return !$field->deprecationReason;
441 441
                                         });
442 442
                                     }
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
                         ],
448 448
                         'interfaces' => [
449 449
                             'type' => Type::listOf(Type::nonNull(self::_type())),
450
-                            'resolve' => function ($type) {
450
+                            'resolve' => function($type) {
451 451
                                 if ($type instanceof ObjectType) {
452 452
                                     return $type->getInterfaces();
453 453
                                 }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         ],
457 457
                         'possibleTypes' => [
458 458
                             'type' => Type::listOf(Type::nonNull(self::_type())),
459
-                            'resolve' => function ($type, $args, $context, ResolveInfo $info) {
459
+                            'resolve' => function($type, $args, $context, ResolveInfo $info) {
460 460
                                 if ($type instanceof InterfaceType || $type instanceof UnionType) {
461 461
                                     return $info->schema->getPossibleTypes($type);
462 462
                                 }
@@ -468,12 +468,12 @@  discard block
 block discarded – undo
468 468
                             'args' => [
469 469
                                 'includeDeprecated' => ['type' => Type::boolean(), 'defaultValue' => false]
470 470
                             ],
471
-                            'resolve' => function ($type, $args) {
471
+                            'resolve' => function($type, $args) {
472 472
                                 if ($type instanceof EnumType) {
473 473
                                     $values = array_values($type->getValues());
474 474
 
475 475
                                     if (empty($args['includeDeprecated'])) {
476
-                                        $values = array_filter($values, function ($value) {
476
+                                        $values = array_filter($values, function($value) {
477 477
                                             return !$value->deprecationReason;
478 478
                                         });
479 479
                                     }
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
                         ],
486 486
                         'inputFields' => [
487 487
                             'type' => Type::listOf(Type::nonNull(self::_inputValue())),
488
-                            'resolve' => function ($type) {
488
+                            'resolve' => function($type) {
489 489
                                 if ($type instanceof InputObjectType) {
490 490
                                     return array_values($type->getFields());
491 491
                                 }
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
                         ],
495 495
                         'ofType' => [
496 496
                             'type' => self::_type(),
497
-                            'resolve' => function ($type) {
497
+                            'resolve' => function($type) {
498 498
                                 if ($type instanceof WrappingType) {
499 499
                                     return $type->getWrappedType();
500 500
                                 }
@@ -524,19 +524,19 @@  discard block
 block discarded – undo
524 524
                         'description' => ['type' => Type::string()],
525 525
                         'args' => [
526 526
                             'type' => Type::nonNull(Type::listOf(Type::nonNull(self::_inputValue()))),
527
-                            'resolve' => function (FieldDefinition $field) {
527
+                            'resolve' => function(FieldDefinition $field) {
528 528
                                 return empty($field->args) ? [] : $field->args;
529 529
                             }
530 530
                         ],
531 531
                         'type' => [
532 532
                             'type' => Type::nonNull(self::_type()),
533
-                            'resolve' => function (FieldDefinition $field) {
533
+                            'resolve' => function(FieldDefinition $field) {
534 534
                                 return $field->getType();
535 535
                             }
536 536
                         ],
537 537
                         'isDeprecated' => [
538 538
                             'type' => Type::nonNull(Type::boolean()),
539
-                            'resolve' => function (FieldDefinition $field) {
539
+                            'resolve' => function(FieldDefinition $field) {
540 540
                                 return !!$field->deprecationReason;
541 541
                             }
542 542
                         ],
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                         'description' => ['type' => Type::string()],
567 567
                         'type' => [
568 568
                             'type' => Type::nonNull(self::_type()),
569
-                            'resolve' => function ($value) {
569
+                            'resolve' => function($value) {
570 570
                                 return method_exists($value, 'getType') ? $value->getType() : $value->type;
571 571
                             }
572 572
                         ],
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
                             'type' => Type::string(),
575 575
                             'description' =>
576 576
                                 'A GraphQL-formatted string representing the default value for this input value.',
577
-                            'resolve' => function ($inputValue) {
577
+                            'resolve' => function($inputValue) {
578 578
                                 /** @var FieldArgument|InputObjectField $inputValue */
579 579
                                 return !$inputValue->defaultValueExists()
580 580
                                     ? null
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
                     'description' => ['type' => Type::string()],
604 604
                     'isDeprecated' => [
605 605
                         'type' => Type::nonNull(Type::boolean()),
606
-                        'resolve' => function ($enumValue) {
606
+                        'resolve' => function($enumValue) {
607 607
                             return !!$enumValue->deprecationReason;
608 608
                         }
609 609
                     ],
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
                 'type' => Type::nonNull(self::_schema()),
671 671
                 'description' => 'Access the current type schema of this server.',
672 672
                 'args' => [],
673
-                'resolve' => function (
673
+                'resolve' => function(
674 674
                     $source,
675 675
                     $args,
676 676
                     $context,
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
                 'args' => [
694 694
                     ['name' => 'name', 'type' => Type::nonNull(Type::string())]
695 695
                 ],
696
-                'resolve' => function ($source, $args, $context, ResolveInfo $info) {
696
+                'resolve' => function($source, $args, $context, ResolveInfo $info) {
697 697
                     return $info->schema->getType($args['name']);
698 698
                 }
699 699
             ]);
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
                 'type' => Type::nonNull(Type::string()),
710 710
                 'description' => 'The name of the current Object type at runtime.',
711 711
                 'args' => [],
712
-                'resolve' => function (
712
+                'resolve' => function(
713 713
                     $source,
714 714
                     $args,
715 715
                     $context,
Please login to merge, or discard this patch.
src/Type/Schema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 if (isset($this->resolvedTypes[$type->name])) {
125 125
                     Utils::invariant(
126 126
                         $type === $this->resolvedTypes[$type->name],
127
-                        "Schema must contain unique named types but contains multiple types named \"$type\" ".
127
+                        "Schema must contain unique named types but contains multiple types named \"$type\" " .
128 128
                         "(see http://webonyx.github.io/graphql-php/type-system/#type-registry)."
129 129
                     );
130 130
                 }
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         $internalTypes = Type::getInternalTypes() + Introspection::getTypes();
444 444
         foreach ($this->getTypeMap() as $name => $type) {
445 445
             if (isset($internalTypes[$name])) {
446
-                continue ;
446
+                continue;
447 447
             }
448 448
 
449 449
             $type->assertValid();
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             if ($this->config->typeLoader) {
453 453
                 Utils::invariant(
454 454
                     $this->loadType($name) === $type,
455
-                    "Type loader returns different instance for {$name} than field/argument definitions. ".
455
+                    "Type loader returns different instance for {$name} than field/argument definitions. " .
456 456
                     'Make sure you always return the same instance for the same type name.'
457 457
                 );
458 458
             }
Please login to merge, or discard this patch.
examples/01-blog/Blog/Data/DataSource.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         $commentReplies = isset(self::$commentReplies[$commentId]) ? self::$commentReplies[$commentId] : [];
180 180
 
181
-        $start = isset($after) ? (int) array_search($afterId, $commentReplies) + 1: 0;
181
+        $start = isset($after) ? (int) array_search($afterId, $commentReplies) + 1 : 0;
182 182
         $commentReplies = array_slice($commentReplies, $start, $limit);
183 183
 
184 184
         return array_map(
@@ -201,6 +201,6 @@  discard block
 block discarded – undo
201 201
 
202 202
     public static function findStoryMentions($storyId)
203 203
     {
204
-        return isset(self::$storyMentions[$storyId]) ? self::$storyMentions[$storyId] :[];
204
+        return isset(self::$storyMentions[$storyId]) ? self::$storyMentions[$storyId] : [];
205 205
     }
206 206
 }
Please login to merge, or discard this patch.
examples/00-hello-world/graphql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
                 'args' => [
20 20
                     'message' => ['type' => Type::string()],
21 21
                 ],
22
-                'resolve' => function ($root, $args) {
22
+                'resolve' => function($root, $args) {
23 23
                     return $root['prefix'] . $args['message'];
24 24
                 }
25 25
             ],
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     'x' => ['type' => Type::int()],
36 36
                     'y' => ['type' => Type::int()],
37 37
                 ],
38
-                'resolve' => function ($root, $args) {
38
+                'resolve' => function($root, $args) {
39 39
                     return $args['x'] + $args['y'];
40 40
                 },
41 41
             ],
Please login to merge, or discard this patch.
examples/02-shorthand/rootvalue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public function resolve($root, $args, $context)
18 18
     {
19
-        return $root['prefix'].$args['message'];
19
+        return $root['prefix'] . $args['message'];
20 20
     }
21 21
 }
22 22
 
Please login to merge, or discard this patch.
tools/gendocs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use GraphQL\Utils\Utils;
5 5
 
6
-$outputFile = __DIR__  . '/../docs/reference.md';
6
+$outputFile = __DIR__ . '/../docs/reference.md';
7 7
 
8 8
 $entries = [
9 9
     \GraphQL\GraphQL::class,
Please login to merge, or discard this patch.
benchmarks/Utils/SchemaGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     {
57 57
         if ($this->typeIndex > $this->config['totalTypes']) {
58 58
             throw new \Exception(
59
-                "Cannot create new type: there are already {$this->typeIndex} ".
59
+                "Cannot create new type: there are already {$this->typeIndex} " .
60 60
                 "which exceeds allowed number of {$this->config['totalTypes']} types total"
61 61
             );
62 62
         }
Please login to merge, or discard this patch.
examples/03-server/graphql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
                 'args' => [
20 20
                     'message' => ['type' => Type::string()],
21 21
                 ],
22
-                'resolve' => function ($root, $args) {
22
+                'resolve' => function($root, $args) {
23 23
                     return $root['prefix'] . $args['message'];
24 24
                 }
25 25
             ],
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     'x' => ['type' => Type::int()],
36 36
                     'y' => ['type' => Type::int()],
37 37
                 ],
38
-                'resolve' => function ($root, $args) {
38
+                'resolve' => function($root, $args) {
39 39
                     return $args['x'] + $args['y'];
40 40
                 },
41 41
             ],
Please login to merge, or discard this patch.
src/Error/Warning.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
         if (self::$warningHandler) {
87 87
             $fn = self::$warningHandler;
88 88
             $fn($errorMessage, $warningId);
89
-        } elseif ((self::$enableWarnings & $warningId) > 0 && ! isset(self::$warned[$warningId])) {
89
+        } elseif ((self::$enableWarnings & $warningId) > 0 && !isset(self::$warned[$warningId])) {
90 90
             self::$warned[$warningId] = true;
91 91
             trigger_error($errorMessage, $messageLevel ?: E_USER_WARNING);
92 92
         }
Please login to merge, or discard this patch.