Passed
Pull Request — master (#284)
by Quang
02:16
created
src/Language/Node/TypesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getTypesAST(): array
32 32
     {
33
-        return \array_map(function (NamedTypeNode $node) {
33
+        return \array_map(function(NamedTypeNode $node) {
34 34
             return $node->toAST();
35 35
         }, $this->types);
36 36
     }
Please login to merge, or discard this patch.
src/Language/Node/EnumValuesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getValuesAST(): array
32 32
     {
33
-        return \array_map(function (EnumValueDefinitionNode $node) {
33
+        return \array_map(function(EnumValueDefinitionNode $node) {
34 34
             return $node->toAST();
35 35
         }, $this->values);
36 36
     }
Please login to merge, or discard this patch.
src/Language/Node/ListValueNode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function getValuesAST(): array
39 39
     {
40
-        return \array_map(function (ValueNodeInterface $node) {
40
+        return \array_map(function(ValueNodeInterface $node) {
41 41
             return $node->toAST();
42 42
         }, $this->values);
43 43
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function __toString(): string
71 71
     {
72
-        return \json_encode(\array_map(function (ValueAwareInterface $node) {
72
+        return \json_encode(\array_map(function(ValueAwareInterface $node) {
73 73
             return $node->getValue();
74 74
         }, $this->getValues()));
75 75
     }
Please login to merge, or discard this patch.
src/Language/Node/ArgumentsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getArgumentsAST(): array
32 32
     {
33
-        return \array_map(function (ArgumentNode $node) {
33
+        return \array_map(function(ArgumentNode $node) {
34 34
             return $node->toAST();
35 35
         }, $this->getArguments());
36 36
     }
Please login to merge, or discard this patch.
src/Type/ScalarTypesProvider.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function register()
35 35
     {
36
-        $this->container->add(GraphQL::BOOLEAN, function (BooleanCoercer $coercer) {
36
+        $this->container->add(GraphQL::BOOLEAN, function(BooleanCoercer $coercer) {
37 37
             return newScalarType([
38 38
                 'name'         => TypeNameEnum::BOOLEAN,
39 39
                 'description'  => 'The `Boolean` scalar type represents `true` or `false`.',
40
-                'serialize'    => function ($value) use ($coercer) {
40
+                'serialize'    => function($value) use ($coercer) {
41 41
                     return $coercer->coerce($value);
42 42
                 },
43
-                'parseValue'   => function ($value) use ($coercer) {
43
+                'parseValue'   => function($value) use ($coercer) {
44 44
                     return $coercer->coerce($value);
45 45
                 },
46
-                'parseLiteral' => function (NodeInterface $node) {
46
+                'parseLiteral' => function(NodeInterface $node) {
47 47
                     if ($node instanceof BooleanValueNode) {
48 48
                         return $node->getValue();
49 49
                     }
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
         }, true/* $shared */)
54 54
             ->withArgument(BooleanCoercer::class);
55 55
 
56
-        $this->container->add(GraphQL::FLOAT, function (FloatCoercer $coercer) {
56
+        $this->container->add(GraphQL::FLOAT, function(FloatCoercer $coercer) {
57 57
             return newScalarType([
58 58
                 'name'         => TypeNameEnum::FLOAT,
59 59
                 'description'  =>
60 60
                     'The `Float` scalar type represents signed double-precision fractional ' .
61 61
                     'values as specified by ' .
62 62
                     '[IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).',
63
-                'serialize'    => function ($value) use ($coercer) {
63
+                'serialize'    => function($value) use ($coercer) {
64 64
                     return $coercer->coerce($value);
65 65
                 },
66
-                'parseValue'   => function ($value) use ($coercer) {
66
+                'parseValue'   => function($value) use ($coercer) {
67 67
                     return $coercer->coerce($value);
68 68
                 },
69
-                'parseLiteral' => function (NodeInterface $node) {
69
+                'parseLiteral' => function(NodeInterface $node) {
70 70
                     if ($node instanceof FloatValueNode || $node instanceof IntValueNode) {
71 71
                         return $node->getValue();
72 72
                     }
@@ -76,19 +76,19 @@  discard block
 block discarded – undo
76 76
         }, true/* $shared */)
77 77
             ->withArgument(FloatCoercer::class);
78 78
 
79
-        $this->container->add(GraphQL::INT, function (IntCoercer $coercer) {
79
+        $this->container->add(GraphQL::INT, function(IntCoercer $coercer) {
80 80
             return newScalarType([
81 81
                 'name'         => TypeNameEnum::INT,
82 82
                 'description'  =>
83 83
                     'The `Int` scalar type represents non-fractional signed whole numeric ' .
84 84
                     'values. Int can represent values between -(2^31) and 2^31 - 1.',
85
-                'serialize'    => function ($value) use ($coercer) {
85
+                'serialize'    => function($value) use ($coercer) {
86 86
                     return $coercer->coerce($value);
87 87
                 },
88
-                'parseValue'   => function ($value) use ($coercer) {
88
+                'parseValue'   => function($value) use ($coercer) {
89 89
                     return $coercer->coerce($value);
90 90
                 },
91
-                'parseLiteral' => function (NodeInterface $node) {
91
+                'parseLiteral' => function(NodeInterface $node) {
92 92
                     if ($node instanceof IntValueNode) {
93 93
                         $value = (int)$node->getValue();
94 94
                         if ((string)$node->getValue() === (string)$value &&
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         }, true/* $shared */)
103 103
             ->withArgument(IntCoercer::class);
104 104
 
105
-        $this->container->add(GraphQL::ID, function (StringCoercer $coercer) {
105
+        $this->container->add(GraphQL::ID, function(StringCoercer $coercer) {
106 106
             return newScalarType([
107 107
                 'name'         => TypeNameEnum::ID,
108 108
                 'description'  =>
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
                     'response as a String; however, it is not intended to be human-readable. ' .
112 112
                     'When expected as an input type, any string (such as `"4"`) or integer ' .
113 113
                     '(such as `4`) input value will be accepted as an ID.',
114
-                'serialize'    => function ($value) use ($coercer) {
114
+                'serialize'    => function($value) use ($coercer) {
115 115
                     return $coercer->coerce($value);
116 116
                 },
117
-                'parseValue'   => function ($value) use ($coercer) {
117
+                'parseValue'   => function($value) use ($coercer) {
118 118
                     return $coercer->coerce($value);
119 119
                 },
120
-                'parseLiteral' => function (NodeInterface $node) {
120
+                'parseLiteral' => function(NodeInterface $node) {
121 121
                     if ($node instanceof StringValueNode || $node instanceof IntValueNode) {
122 122
                         return $node->getValue();
123 123
                     }
@@ -127,20 +127,20 @@  discard block
 block discarded – undo
127 127
         }, true/* $shared */)
128 128
             ->withArgument(StringCoercer::class);
129 129
 
130
-        $this->container->add(GraphQL::STRING, function (StringCoercer $coercer) {
130
+        $this->container->add(GraphQL::STRING, function(StringCoercer $coercer) {
131 131
             return newScalarType([
132 132
                 'name'         => TypeNameEnum::STRING,
133 133
                 'description'  =>
134 134
                     'The `String` scalar type represents textual data, represented as UTF-8 ' .
135 135
                     'character sequences. The String type is most often used by GraphQL to ' .
136 136
                     'represent free-form human-readable text.',
137
-                'serialize'    => function ($value) use ($coercer) {
137
+                'serialize'    => function($value) use ($coercer) {
138 138
                     return $coercer->coerce($value);
139 139
                 },
140
-                'parseValue'   => function ($value) use ($coercer) {
140
+                'parseValue'   => function($value) use ($coercer) {
141 141
                     return $coercer->coerce($value);
142 142
                 },
143
-                'parseLiteral' => function (NodeInterface $node) {
143
+                'parseLiteral' => function(NodeInterface $node) {
144 144
                     if ($node instanceof StringValueNode) {
145 145
                         return $node->getValue();
146 146
                     }
Please login to merge, or discard this patch.
src/Execution/ExecutionResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $array = [];
67 67
 
68 68
         if (!empty($this->errors)) {
69
-            $array['errors'] = \array_map(function (GraphQLException $error) {
69
+            $array['errors'] = \array_map(function(GraphQLException $error) {
70 70
                 return $error->toArray();
71 71
             }, $this->errors);
72 72
         }
Please login to merge, or discard this patch.
src/Util/TypeInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         ?TypeInterface $initialType = null
78 78
     ) {
79 79
         $this->schema                     = $schema;
80
-        $this->getFieldDefinitionFunction = $getFieldDefinitionFunction ?? function (
80
+        $this->getFieldDefinitionFunction = $getFieldDefinitionFunction ?? function(
81 81
                 Schema $schema,
82 82
                 TypeInterface $parentType,
83 83
                 FieldNode $fieldNode
Please login to merge, or discard this patch.
src/Schema/utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 function printLines(array $lines): string
75 75
 {
76 76
     // Don't print empty lines
77
-    $lines = \array_filter($lines, function (string $line) {
77
+    $lines = \array_filter($lines, function(string $line) {
78 78
         return $line !== '';
79 79
     });
80 80
     
Please login to merge, or discard this patch.
src/Util/TypeHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
                 // If both types are abstract, then determine if there is any intersection
128 128
                 // between possible concrete types of each.
129 129
                 return arraySome($schema->getPossibleTypes($typeA),
130
-                    function (NamedTypeInterface $type) use ($schema, $typeB) {
130
+                    function(NamedTypeInterface $type) use ($schema, $typeB) {
131 131
                         return $schema->isPossibleType($typeB, $type);
132 132
                     });
133 133
             }
Please login to merge, or discard this patch.