@@ -35,37 +35,37 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function register() |
37 | 37 | { |
38 | - $this->container->add(GraphQL::BOOLEAN, function () { |
|
38 | + $this->container->add(GraphQL::BOOLEAN, function() { |
|
39 | 39 | return GraphQLScalarType([ |
40 | 40 | 'name' => TypeNameEnum::BOOLEAN, |
41 | 41 | 'description' => 'The `Boolean` scalar type represents `true` or `false`.', |
42 | - 'serialize' => function ($value) { |
|
42 | + 'serialize' => function($value) { |
|
43 | 43 | return coerceBoolean($value); |
44 | 44 | }, |
45 | - 'parseValue' => function ($value) { |
|
45 | + 'parseValue' => function($value) { |
|
46 | 46 | return coerceBoolean($value); |
47 | 47 | }, |
48 | 48 | |
49 | - 'parseLiteral' => function (NodeInterface $astNode) { |
|
49 | + 'parseLiteral' => function(NodeInterface $astNode) { |
|
50 | 50 | return $astNode instanceof BooleanValueNode ? $astNode->getValue() : null; |
51 | 51 | }, |
52 | 52 | ]); |
53 | 53 | }, true/* $shared */); |
54 | 54 | |
55 | - $this->container->add(GraphQL::FLOAT, function () { |
|
55 | + $this->container->add(GraphQL::FLOAT, function() { |
|
56 | 56 | return GraphQLScalarType([ |
57 | 57 | 'name' => TypeNameEnum::FLOAT, |
58 | 58 | 'description' => |
59 | 59 | 'The `Float` scalar type represents signed double-precision fractional ' . |
60 | 60 | 'values as specified by ' . |
61 | 61 | '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).', |
62 | - 'serialize' => function ($value) { |
|
62 | + 'serialize' => function($value) { |
|
63 | 63 | return coerceFloat($value); |
64 | 64 | }, |
65 | - 'parseValue' => function ($value) { |
|
65 | + 'parseValue' => function($value) { |
|
66 | 66 | return coerceFloat($value); |
67 | 67 | }, |
68 | - 'parseLiteral' => function (NodeInterface $astNode) { |
|
68 | + 'parseLiteral' => function(NodeInterface $astNode) { |
|
69 | 69 | if ($astNode instanceof FloatValueNode || $astNode instanceof IntValueNode) { |
70 | 70 | return $astNode->getValue(); |
71 | 71 | } |
@@ -75,25 +75,25 @@ discard block |
||
75 | 75 | ]); |
76 | 76 | }, true/* $shared */); |
77 | 77 | |
78 | - $this->container->add(GraphQL::INT, function () { |
|
78 | + $this->container->add(GraphQL::INT, function() { |
|
79 | 79 | return GraphQLScalarType([ |
80 | 80 | 'name' => TypeNameEnum::INT, |
81 | 81 | 'description' => |
82 | 82 | 'The `Int` scalar type represents non-fractional signed whole numeric ' . |
83 | 83 | 'values. Int can represent values between -(2^31) and 2^31 - 1.', |
84 | - 'serialize' => function ($value) { |
|
84 | + 'serialize' => function($value) { |
|
85 | 85 | return coerceInt($value); |
86 | 86 | }, |
87 | - 'parseValue' => function ($value) { |
|
87 | + 'parseValue' => function($value) { |
|
88 | 88 | return coerceInt($value); |
89 | 89 | }, |
90 | - 'parseLiteral' => function (NodeInterface $astNode) { |
|
90 | + 'parseLiteral' => function(NodeInterface $astNode) { |
|
91 | 91 | return $astNode instanceof IntValueNode ? $astNode->getValue() : null; |
92 | 92 | }, |
93 | 93 | ]); |
94 | 94 | }, true/* $shared */); |
95 | 95 | |
96 | - $this->container->add(GraphQL::ID, function () { |
|
96 | + $this->container->add(GraphQL::ID, function() { |
|
97 | 97 | return GraphQLScalarType([ |
98 | 98 | 'name' => TypeNameEnum::ID, |
99 | 99 | 'description' => |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | 'response as a String; however, it is not intended to be human-readable. ' . |
103 | 103 | 'When expected as an input type, any string (such as `"4"`) or integer ' . |
104 | 104 | '(such as `4`) input value will be accepted as an ID.', |
105 | - 'serialize' => function ($value) { |
|
105 | + 'serialize' => function($value) { |
|
106 | 106 | return coerceString($value); |
107 | 107 | }, |
108 | - 'parseValue' => function ($value) { |
|
108 | + 'parseValue' => function($value) { |
|
109 | 109 | return coerceString($value); |
110 | 110 | }, |
111 | - 'parseLiteral' => function (NodeInterface $astNode) { |
|
111 | + 'parseLiteral' => function(NodeInterface $astNode) { |
|
112 | 112 | if ($astNode instanceof StringValueNode || $astNode instanceof IntValueNode) { |
113 | 113 | return $astNode->getValue(); |
114 | 114 | } |
@@ -118,20 +118,20 @@ discard block |
||
118 | 118 | ]); |
119 | 119 | }, true/* $shared */); |
120 | 120 | |
121 | - $this->container->add(GraphQL::STRING, function () { |
|
121 | + $this->container->add(GraphQL::STRING, function() { |
|
122 | 122 | return GraphQLScalarType([ |
123 | 123 | 'name' => TypeNameEnum::STRING, |
124 | 124 | 'description' => |
125 | 125 | 'The `String` scalar type represents textual data, represented as UTF-8 ' . |
126 | 126 | 'character sequences. The String type is most often used by GraphQL to ' . |
127 | 127 | 'represent free-form human-readable text.', |
128 | - 'serialize' => function ($value) { |
|
128 | + 'serialize' => function($value) { |
|
129 | 129 | return coerceString($value); |
130 | 130 | }, |
131 | - 'parseValue' => function ($value) { |
|
131 | + 'parseValue' => function($value) { |
|
132 | 132 | return coerceString($value); |
133 | 133 | }, |
134 | - 'parseLiteral' => function (NodeInterface $astNode) { |
|
134 | + 'parseLiteral' => function(NodeInterface $astNode) { |
|
135 | 135 | return $astNode instanceof StringValueNode ? $astNode->getValue() : null; |
136 | 136 | }, |
137 | 137 | ]); |