Completed
Pull Request — master (#20)
by Christoffer
02:40 queued 53s
created
src/Type/scalars.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
         $instance = GraphQLScalarType([
38 38
             'name'         => TypeNameEnum::BOOLEAN,
39 39
             'description'  => 'The `Boolean` scalar type represents `true` or `false`.',
40
-            'serialize'    => function ($value) {
40
+            'serialize'    => function($value) {
41 41
                 return coerceBoolean($value);
42 42
             },
43
-            'parseValue'   => function ($value) {
43
+            'parseValue'   => function($value) {
44 44
                 return coerceBoolean($value);
45 45
             },
46
-            'parseLiteral' => function (NodeInterface $astNode) {
46
+            'parseLiteral' => function(NodeInterface $astNode) {
47 47
                 return $astNode->getKind() === NodeKindEnum::BOOLEAN ? $astNode->getValue() : null;
48 48
             },
49 49
         ]);
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
                 'The `Float` scalar type represents signed double-precision fractional ' .
85 85
                 'values as specified by ' .
86 86
                 '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).',
87
-            'serialize'    => function ($value) {
87
+            'serialize'    => function($value) {
88 88
                 return coerceFloat($value);
89 89
             },
90
-            'parseValue'   => function ($value) {
90
+            'parseValue'   => function($value) {
91 91
                 return coerceFloat($value);
92 92
             },
93
-            'parseLiteral' => function (NodeInterface $astNode) {
93
+            'parseLiteral' => function(NodeInterface $astNode) {
94 94
                 return in_array($astNode->getKind(),
95 95
                     [NodeKindEnum::FLOAT, NodeKindEnum::INT]) ? $astNode->getValue() : null;
96 96
             },
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
             'description'  =>
143 143
                 'The `Int` scalar type represents non-fractional signed whole numeric ' .
144 144
                 'values. Int can represent values between -(2^31) and 2^31 - 1.',
145
-            'serialize'    => function ($value) {
145
+            'serialize'    => function($value) {
146 146
                 return coerceInt($value);
147 147
             },
148
-            'parseValue'   => function ($value) {
148
+            'parseValue'   => function($value) {
149 149
                 return coerceInt($value);
150 150
             },
151
-            'parseLiteral' => function (NodeInterface $astNode) {
151
+            'parseLiteral' => function(NodeInterface $astNode) {
152 152
                 return $astNode->getKind() === NodeKindEnum::INT ? $astNode->getValue() : null;
153 153
             },
154 154
         ]);
@@ -199,13 +199,13 @@  discard block
 block discarded – undo
199 199
                 'response as a String; however, it is not intended to be human-readable. ' .
200 200
                 'When expected as an input type, any string (such as `"4"`) or integer ' .
201 201
                 '(such as `4`) input value will be accepted as an ID.',
202
-            'serialize'    => function ($value) {
202
+            'serialize'    => function($value) {
203 203
                 return coerceString($value);
204 204
             },
205
-            'parseValue'   => function ($value) {
205
+            'parseValue'   => function($value) {
206 206
                 return coerceString($value);
207 207
             },
208
-            'parseLiteral' => function (NodeInterface $astNode) {
208
+            'parseLiteral' => function(NodeInterface $astNode) {
209 209
                 return in_array($astNode->getKind(),
210 210
                     [NodeKindEnum::STRING, NodeKindEnum::INT]) ? $astNode->getValue() : null;
211 211
             },
@@ -229,13 +229,13 @@  discard block
 block discarded – undo
229 229
                 'The `String` scalar type represents textual data, represented as UTF-8 ' .
230 230
                 'character sequences. The String type is most often used by GraphQL to ' .
231 231
                 'represent free-form human-readable text.',
232
-            'serialize'    => function ($value) {
232
+            'serialize'    => function($value) {
233 233
                 return coerceString($value);
234 234
             },
235
-            'parseValue'   => function ($value) {
235
+            'parseValue'   => function($value) {
236 236
                 return coerceString($value);
237 237
             },
238
-            'parseLiteral' => function (NodeInterface $astNode) {
238
+            'parseLiteral' => function(NodeInterface $astNode) {
239 239
                 return $astNode->getKind() === NodeKindEnum::STRING ? $astNode->getValue() : null;
240 240
             },
241 241
         ]);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 {
267 267
     return arraySome(
268 268
         specifiedScalarTypes(),
269
-        function (ScalarType $specifiedScalarType) use ($type) {
269
+        function(ScalarType $specifiedScalarType) use ($type) {
270 270
             return $type->getName() === $specifiedScalarType->getName();
271 271
         }
272 272
     );
Please login to merge, or discard this patch.