Completed
Push — master ( 786636...6c7957 )
by Alexandr
03:01
created
src/Introspection/SchemaType.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,6 @@
 block discarded – undo
12 12
 use Youshido\GraphQL\Schema\AbstractSchema;
13 13
 use Youshido\GraphQL\Type\ListType\ListType;
14 14
 use Youshido\GraphQL\Type\Object\AbstractObjectType;
15
-use Youshido\GraphQL\Type\Object\ObjectType;
16
-use Youshido\GraphQL\Type\TypeMap;
17 15
 
18 16
 class SchemaType extends AbstractObjectType
19 17
 {
Please login to merge, or discard this patch.
Tests/Library/Type/InputObjectTypeTest.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 
12 12
 use Youshido\GraphQL\Execution\Processor;
13
-use Youshido\GraphQL\Parser\Ast\ArgumentValue\InputObject;
14 13
 use Youshido\GraphQL\Schema\Schema;
15 14
 use Youshido\GraphQL\Type\InputObject\InputObjectType;
16 15
 use Youshido\GraphQL\Type\ListType\ListType;
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
             [
88 88
                 'data'   => ['createList' => null],
89 89
                 'errors' => [[
90
-                                 'message'   => 'Not valid type for argument "posts" in query "createList"',
91
-                                 'locations' => [
92
-                                     [
93
-                                         'line'   => 1,
94
-                                         'column' => 23
95
-                                     ]
96
-                                 ]
97
-                             ]]
90
+                                    'message'   => 'Not valid type for argument "posts" in query "createList"',
91
+                                    'locations' => [
92
+                                        [
93
+                                            'line'   => 1,
94
+                                            'column' => 23
95
+                                        ]
96
+                                    ]
97
+                                ]]
98 98
             ],
99 99
             $processor->getResponseData()
100 100
         );
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
         $this->assertEquals([
186 186
             'data'   => ['createList' => null],
187 187
             'errors' => [[
188
-                             'message'   => 'Not valid type for argument "topArgument" in query "createList"',
189
-                             'locations' => [
190
-                                 [
191
-                                     'line'   => 1,
192
-                                     'column' => 23
193
-                                 ]
194
-                             ]
195
-                         ]],
188
+                                'message'   => 'Not valid type for argument "topArgument" in query "createList"',
189
+                                'locations' => [
190
+                                    [
191
+                                        'line'   => 1,
192
+                                        'column' => 23
193
+                                    ]
194
+                                ]
195
+                            ]],
196 196
         ], $processor->getResponseData());
197 197
         $processor->getExecutionContext()->clearErrors();
198 198
         $processor->processPayload('mutation { createList(topArgument:{
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 'fields' => [
56 56
                     'empty' => [
57 57
                         'type'    => new StringType(),
58
-                        'resolve' => function () {
58
+                        'resolve' => function() {
59 59
                             return null;
60 60
                         }
61 61
                     ]
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                             ]))
75 75
                         ],
76 76
                         'type'    => new BooleanType(),
77
-                        'resolve' => function ($object, $args) {
77
+                        'resolve' => function($object, $args) {
78 78
                             return true;
79 79
                         }
80 80
                     ]
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 'fields' => [
109 109
                     'empty' => [
110 110
                         'type'    => new StringType(),
111
-                        'resolve' => function () {
111
+                        'resolve' => function() {
112 112
                             return null;
113 113
                         }
114 114
                     ]
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                             ])
128 128
                         ],
129 129
                         'type'    => new BooleanType(),
130
-                        'resolve' => function ($object, $args) {
130
+                        'resolve' => function($object, $args) {
131 131
                             return true;
132 132
                         }
133 133
                     ]
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 'fields' => [
152 152
                     'empty' => [
153 153
                         'type'    => new StringType(),
154
-                        'resolve' => function () {
154
+                        'resolve' => function() {
155 155
                         }
156 156
                     ],
157 157
                 ]
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                                 ]
175 175
                             ])
176 176
                         ],
177
-                        'resolve' => function () {
177
+                        'resolve' => function() {
178 178
                             return 'success message';
179 179
                         }
180 180
                     ]
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
                                 ],
224 224
                             ],
225 225
                         ],
226
-                        'resolve' => function ($source, $args) {
226
+                        'resolve' => function($source, $args) {
227 227
                             return [
228
-                                'limit is ' . $args['paging']['limit'],
229
-                                'offset is ' . $args['paging']['offset'],
228
+                                'limit is '.$args['paging']['limit'],
229
+                                'offset is '.$args['paging']['offset'],
230 230
                             ];
231 231
                         }
232 232
                     ],
Please login to merge, or discard this patch.
Tests/Schema/SchemaTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $this->assertEquals(1, count($schema->getMutationType()->getFields()));
38 38
 
39
-        $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => function () {
39
+        $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => function() {
40 40
         }]);
41 41
         $this->assertEquals(2, count($schema->getMutationType()->getFields()));
42 42
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             'fields'      => [
69 69
                 'name' => new StringType(),
70 70
             ],
71
-            'resolveType' => function () use ($authorType) {
71
+            'resolveType' => function() use ($authorType) {
72 72
                 return $authorType;
73 73
             }
74 74
         ]);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 'fields' => [
88 88
                     'user' => [
89 89
                         'type'    => $userInterface,
90
-                        'resolve' => function () {
90
+                        'resolve' => function() {
91 91
                             return [
92 92
                                 'name' => 'Alex'
93 93
                             ];
Please login to merge, or discard this patch.
Tests/Schema/IntrospectionTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             'description'       => 'latest description',
137 137
             'deprecationReason' => 'for test',
138 138
             'isDeprecated'      => true,
139
-            'resolve'           => function () {
139
+            'resolve'           => function() {
140 140
                 return [
141 141
                     'id'   => 1,
142 142
                     'name' => 'Alex'
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
                                 ['name' => 'String', 'fields' => null],
203 203
                                 ['name' => '__Schema', 'fields' => [['name' => 'queryType', 'args' => []], ['name' => 'mutationType', 'args' => []], ['name' => 'subscriptionType', 'args' => []], ['name' => 'types', 'args' => []], ['name' => 'directives', 'args' => []]]],
204 204
                                 ['name' => '__Type', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'kind', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'ofType', 'args' => []], ['name' => 'inputFields', 'args' => []], ['name' => 'enumValues', 'args' => [['defaultValue' => 'false']]], ['name' => 'fields', 'args' => [['defaultValue' => 'false']]], ['name' => 'interfaces', 'args' => []], ['name' => 'possibleTypes', 'args' => []]]],
205
-                                ['name' => '__InputValue', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'type', 'args' => []], ['name' => 'defaultValue', 'args' => []],]],
205
+                                ['name' => '__InputValue', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'type', 'args' => []], ['name' => 'defaultValue', 'args' => []], ]],
206 206
                                 ['name' => 'Boolean', 'fields' => null],
207
-                                ['name' => '__EnumValue', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'deprecationReason', 'args' => []], ['name' => 'isDeprecated', 'args' => []],]],
207
+                                ['name' => '__EnumValue', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'deprecationReason', 'args' => []], ['name' => 'isDeprecated', 'args' => []], ]],
208 208
                                 ['name' => '__Field', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'isDeprecated', 'args' => []], ['name' => 'deprecationReason', 'args' => []], ['name' => 'type', 'args' => []], ['name' => 'args', 'args' => []]]],
209 209
                                 ['name' => '__Directive', 'fields' => [['name' => 'name', 'args' => []], ['name' => 'description', 'args' => []], ['name' => 'args', 'args' => []], ['name' => 'onOperation', 'args' => []], ['name' => 'onFragment', 'args' => []], ['name' => 'onField', 'args' => []]]],
210 210
                             ]
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                 'id'   => ['type' => new IntType()],
292 292
                 'name' => ['type' => new IntType()],
293 293
             ],
294
-            'resolveType' => function ($type) {
294
+            'resolveType' => function($type) {
295 295
 
296 296
             }
297 297
         ]);
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         $unionType = new UnionType([
320 320
             'name'        => 'UnionType',
321 321
             'types'       => [$object1, $object2],
322
-            'resolveType' => function () {
322
+            'resolveType' => function() {
323 323
 
324 324
             }
325 325
         ]);
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             'args'    => [
331 331
                 'id' => ['type' => TypeMap::TYPE_INT]
332 332
             ],
333
-            'resolve' => function () {
333
+            'resolve' => function() {
334 334
                 return [
335 335
                     'id'   => 1,
336 336
                     'name' => 'Alex'
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                     ]
357 357
                 ])
358 358
             ],
359
-            'resolve' => function () {
359
+            'resolve' => function() {
360 360
                 return null;
361 361
             }
362 362
         ]));
Please login to merge, or discard this patch.