Passed
Pull Request — master (#21)
by Christoffer
02:08
created
src/Type/scalars.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 {
73 73
     return arraySome(
74 74
         specifiedScalarTypes(),
75
-        function (ScalarType $specifiedScalarType) use ($type) {
75
+        function(ScalarType $specifiedScalarType) use ($type) {
76 76
             return $type->getName() === $specifiedScalarType->getName();
77 77
         }
78 78
     );
Please login to merge, or discard this patch.
src/GraphQLRuntime.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
      */
265 265
     protected function registerParser()
266 266
     {
267
-        $this->singleton(NodeBuilderInterface::class, function () {
267
+        $this->singleton(NodeBuilderInterface::class, function() {
268 268
             return new NodeBuilder(self::getNodeBuilders());
269 269
         });
270 270
 
271 271
         $this->singleton(ParserInterface::class, Parser::class)
272 272
             ->addArgument(NodeBuilderInterface::class);
273 273
 
274
-        $this->bind(LexerInterface::class, function () {
274
+        $this->bind(LexerInterface::class, function() {
275 275
             return new Lexer(self::getSourceReaders());
276 276
         });
277 277
     }
@@ -303,18 +303,18 @@  discard block
 block discarded – undo
303 303
             return (bool)$value;
304 304
         }
305 305
 
306
-        $this->singleton('GraphQLBoolean', function () {
306
+        $this->singleton('GraphQLBoolean', function() {
307 307
             return GraphQLScalarType([
308 308
                 'name'        => TypeNameEnum::BOOLEAN,
309 309
                 'description' => 'The `Boolean` scalar type represents `true` or `false`.',
310
-                'serialize'   => function ($value) {
310
+                'serialize'   => function($value) {
311 311
                     return coerceBoolean($value);
312 312
                 },
313
-                'parseValue'  => function ($value) {
313
+                'parseValue'  => function($value) {
314 314
                     return coerceBoolean($value);
315 315
                 },
316 316
 
317
-                'parseLiteral' => function (NodeInterface $astNode) {
317
+                'parseLiteral' => function(NodeInterface $astNode) {
318 318
                     /** @var BooleanValueNode $astNode */
319 319
                     return $astNode->getKind() === NodeKindEnum::BOOLEAN ? $astNode->getValue() : null;
320 320
                 },
@@ -339,20 +339,20 @@  discard block
 block discarded – undo
339 339
             throw new \TypeError(sprintf('Float cannot represent non numeric value: %s', $value));
340 340
         }
341 341
 
342
-        $this->singleton('GraphQLFloat', function () {
342
+        $this->singleton('GraphQLFloat', function() {
343 343
             return GraphQLScalarType([
344 344
                 'name'         => TypeNameEnum::FLOAT,
345 345
                 'description'  =>
346 346
                     'The `Float` scalar type represents signed double-precision fractional ' .
347 347
                     'values as specified by ' .
348 348
                     '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).',
349
-                'serialize'    => function ($value) {
349
+                'serialize'    => function($value) {
350 350
                     return coerceFloat($value);
351 351
                 },
352
-                'parseValue'   => function ($value) {
352
+                'parseValue'   => function($value) {
353 353
                     return coerceFloat($value);
354 354
                 },
355
-                'parseLiteral' => function (NodeInterface $astNode) {
355
+                'parseLiteral' => function(NodeInterface $astNode) {
356 356
                     /** @var FloatValueNode $astNode */
357 357
                     return in_array($astNode->getKind(), [NodeKindEnum::FLOAT, NodeKindEnum::INT], true)
358 358
                         ? $astNode->getValue()
@@ -390,19 +390,19 @@  discard block
 block discarded – undo
390 390
             return $intValue;
391 391
         }
392 392
 
393
-        $this->singleton('GraphQLInt', function () {
393
+        $this->singleton('GraphQLInt', function() {
394 394
             return GraphQLScalarType([
395 395
                 'name'         => TypeNameEnum::INT,
396 396
                 'description'  =>
397 397
                     'The `Int` scalar type represents non-fractional signed whole numeric ' .
398 398
                     'values. Int can represent values between -(2^31) and 2^31 - 1.',
399
-                'serialize'    => function ($value) {
399
+                'serialize'    => function($value) {
400 400
                     return coerceInt($value);
401 401
                 },
402
-                'parseValue'   => function ($value) {
402
+                'parseValue'   => function($value) {
403 403
                     return coerceInt($value);
404 404
                 },
405
-                'parseLiteral' => function (NodeInterface $astNode) {
405
+                'parseLiteral' => function(NodeInterface $astNode) {
406 406
                     /** @var IntValueNode $astNode */
407 407
                     return $astNode->getKind() === NodeKindEnum::INT ? $astNode->getValue() : null;
408 408
                 },
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             return (string)$value;
436 436
         }
437 437
 
438
-        $this->singleton('GraphQLID', function () {
438
+        $this->singleton('GraphQLID', function() {
439 439
             return GraphQLScalarType([
440 440
                 'name'         => TypeNameEnum::ID,
441 441
                 'description'  =>
@@ -444,13 +444,13 @@  discard block
 block discarded – undo
444 444
                     'response as a String; however, it is not intended to be human-readable. ' .
445 445
                     'When expected as an input type, any string (such as `"4"`) or integer ' .
446 446
                     '(such as `4`) input value will be accepted as an ID.',
447
-                'serialize'    => function ($value) {
447
+                'serialize'    => function($value) {
448 448
                     return coerceString($value);
449 449
                 },
450
-                'parseValue'   => function ($value) {
450
+                'parseValue'   => function($value) {
451 451
                     return coerceString($value);
452 452
                 },
453
-                'parseLiteral' => function (NodeInterface $astNode) {
453
+                'parseLiteral' => function(NodeInterface $astNode) {
454 454
                     /** @var StringValueNode $astNode */
455 455
                     return in_array($astNode->getKind(), [NodeKindEnum::STRING, NodeKindEnum::INT], true)
456 456
                         ? $astNode->getValue()
@@ -459,20 +459,20 @@  discard block
 block discarded – undo
459 459
             ]);
460 460
         });
461 461
 
462
-        $this->singleton('GraphQLString', function () {
462
+        $this->singleton('GraphQLString', function() {
463 463
             return GraphQLScalarType([
464 464
                 'name'         => TypeNameEnum::STRING,
465 465
                 'description'  =>
466 466
                     'The `String` scalar type represents textual data, represented as UTF-8 ' .
467 467
                     'character sequences. The String type is most often used by GraphQL to ' .
468 468
                     'represent free-form human-readable text.',
469
-                'serialize'    => function ($value) {
469
+                'serialize'    => function($value) {
470 470
                     return coerceString($value);
471 471
                 },
472
-                'parseValue'   => function ($value) {
472
+                'parseValue'   => function($value) {
473 473
                     return coerceString($value);
474 474
                 },
475
-                'parseLiteral' => function (NodeInterface $astNode) {
475
+                'parseLiteral' => function(NodeInterface $astNode) {
476 476
                     /** @var StringValueNode $astNode */
477 477
                     return $astNode->getKind() === NodeKindEnum::STRING ? $astNode->getValue() : null;
478 478
                 },
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
      */
486 486
     protected function registerDirectives()
487 487
     {
488
-        $this->singleton('GraphQLIncludeDirective', function () {
488
+        $this->singleton('GraphQLIncludeDirective', function() {
489 489
             return GraphQLDirective([
490 490
                 'name'        => 'include',
491 491
                 'description' =>
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             ]);
506 506
         });
507 507
 
508
-        $this->singleton('GraphQLSkipDirective', function () {
508
+        $this->singleton('GraphQLSkipDirective', function() {
509 509
             return GraphQLDirective([
510 510
                 'name'        => 'skip',
511 511
                 'description' =>
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
             ]);
526 526
         });
527 527
 
528
-        $this->singleton('GraphQLDeprecatedDirective', function () {
528
+        $this->singleton('GraphQLDeprecatedDirective', function() {
529 529
             return GraphQLDirective([
530 530
                 'name'        => 'deprecated',
531 531
                 'description' => 'Marks an element of a GraphQL schema as no longer supported.',
Please login to merge, or discard this patch.