Completed
Push — master ( 461e07...b4459a )
by Alexandr
03:37
created
src/Parser/Tokenizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
 
271 271
     protected function createError($message)
272 272
     {
273
-        return new SyntaxErrorException($message . " ({$this->line}:{$this->getColumn()})");
273
+        return new SyntaxErrorException($message." ({$this->line}:{$this->getColumn()})");
274 274
     }
275 275
 
276 276
     protected function getColumn()
Please login to merge, or discard this patch.
src/Processor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     protected function executeMutation(Mutation $mutation, $currentLevelSchema)
159 159
     {
160
-        if (!$currentLevelSchema) throw new ConfigurationException('There is no mutation '. $mutation->getName());
160
+        if (!$currentLevelSchema) throw new ConfigurationException('There is no mutation '.$mutation->getName());
161 161
 
162 162
         if (!$this->resolveValidator->checkFieldExist($currentLevelSchema, $mutation)) {
163 163
             return null;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 }
246 246
             } elseif ($field->getType()->getKind() == TypeMap::KIND_NON_NULL) {
247 247
                 if (!$field->getType()->isValidValue($preResolvedValue)) {
248
-                    $this->resolveValidator->addError(new ResolveException(sprintf('Cannot return null for non-nullable field %s', $astField->getName() . '.' . $field->getName())));
248
+                    $this->resolveValidator->addError(new ResolveException(sprintf('Cannot return null for non-nullable field %s', $astField->getName().'.'.$field->getName())));
249 249
                 } elseif (!$field->getType()->getNullableType()->isValidValue($preResolvedValue)) {
250 250
                     $this->resolveValidator->addError(new ResolveException(sprintf('Not valid value for %s field %s', $field->getType()->getNullableType()->getKind(), $field->getName())));
251 251
                     $value = null;
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
     protected function getPropertyValue($data, $path)
357 357
     {
358 358
         if (is_object($data)) {
359
-            $getter = 'get' . $this->classify($path);
359
+            $getter = 'get'.$this->classify($path);
360 360
 
361 361
             return is_callable([$data, $getter]) ? $data->$getter() : null;
362 362
         } elseif (is_array($data)) {
Please login to merge, or discard this patch.
Tests/Type/Union/Schema/QueryType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
     {
25 25
         $config
26 26
             ->addField('unionList', new ListType(new TestUnionType()), [
27
-                'resolve' => function () {
27
+                'resolve' => function() {
28 28
                     return UnionTestData::getList();
29 29
                 }
30 30
             ])
31 31
             ->addField('oneUnion', new TestUnionType(), [
32
-                'resolve' => function () {
32
+                'resolve' => function() {
33 33
                     return UnionTestData::getOne();
34 34
                 }
35 35
             ]);
Please login to merge, or discard this patch.
Tests/ProcessorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                         'id'   => ['type' => TypeMap::TYPE_INT],
131 131
                         'name' => ['type' => TypeMap::TYPE_STRING]
132 132
                     ],
133
-                    'resolve' => function () {
133
+                    'resolve' => function() {
134 134
                         return [
135 135
                             'id'   => 1,
136 136
                             'name' => 'Alex'
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
                                 ['name' => 'String', 'fields' => null],
193 193
                                 ['name' => '__Schema', 'fields' => [['name' => 'queryType'], ['name' => 'mutationType'], ['name' => 'subscriptionType'], ['name' => 'types'], ['name' => 'directives']]],
194 194
                                 ['name' => '__Type', 'fields' => [['name' => 'name'], ['name' => 'kind'], ['name' => 'description'], ['name' => 'ofType'], ['name' => 'inputFields'], ['name' => 'enumValues'], ['name' => 'fields'], ['name' => 'interfaces'], ['name' => 'possibleTypes']]],
195
-                                ['name' => '__InputValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'type'], ['name' => 'defaultValue'],]],
196
-                                ['name' => '__EnumValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'deprecationReason'], ['name' => 'isDeprecated'],]],
195
+                                ['name' => '__InputValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'type'], ['name' => 'defaultValue'], ]],
196
+                                ['name' => '__EnumValue', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'deprecationReason'], ['name' => 'isDeprecated'], ]],
197 197
                                 ['name' => 'Boolean', 'fields' => null],
198 198
                                 ['name' => '__Field', 'fields' => [['name' => 'name'], ['name' => 'description'], ['name' => 'isDeprecated'], ['name' => 'deprecationReason'], ['name' => 'type'], ['name' => 'args']]],
199 199
                                 ['name' => '__Subscription', 'fields' => [['name' => 'name']]],
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
                         'id'   => ['type' => TypeMap::TYPE_INT],
288 288
                         'name' => ['type' => TypeMap::TYPE_STRING]
289 289
                     ],
290
-                    'resolve' => function () {
290
+                    'resolve' => function() {
291 291
                         return [
292 292
                             'id'   => 1,
293 293
                             'name' => 'Alex'
Please login to merge, or discard this patch.
Tests/StarWars/Schema/CharacterInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             ->addField('id', TypeMap::TYPE_ID, ['required' => true])
22 22
             ->addField('name', TypeMap::TYPE_STRING, ['required' => true])
23 23
             ->addField('friends', new ListType(new CharacterInterface()), [
24
-                'resolve' => function ($value) {
24
+                'resolve' => function($value) {
25 25
                     return $value['friends'];
26 26
                 }
27 27
             ])
Please login to merge, or discard this patch.
Tests/StarWars/Schema/DroidType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         parent::build($config);
30 30
 
31
-        $config->getField('friends')->getConfig()->set('resolve', function ($droid) {
31
+        $config->getField('friends')->getConfig()->set('resolve', function($droid) {
32 32
             return StarWarsData::getFriends($droid);
33 33
         });
34 34
 
Please login to merge, or discard this patch.
examples/01_sandbox/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Youshido\GraphQL\Type\Object\ObjectType;
7 7
 use Youshido\GraphQL\Type\Scalar\StringType;
8 8
 
9
-require_once __DIR__ . '/../../vendor/autoload.php';
9
+require_once __DIR__.'/../../vendor/autoload.php';
10 10
 
11 11
 $processor = new Processor();
12 12
 $processor->setSchema(new Schema([
@@ -24,4 +24,4 @@  discard block
 block discarded – undo
24 24
 ]));
25 25
 
26 26
 $processor->processRequest('{ currentTime }');
27
-echo json_encode($processor->getResponseData()) . "\n";
27
+echo json_encode($processor->getResponseData())."\n";
Please login to merge, or discard this patch.
examples/02_blog_inline/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
 use Youshido\GraphQL\Type\Scalar\StringType;
10 10
 
11 11
 
12
-require_once __DIR__ . '/../../vendor/autoload.php';
13
-require_once __DIR__ . '/inline-schema.php';
12
+require_once __DIR__.'/../../vendor/autoload.php';
13
+require_once __DIR__.'/inline-schema.php';
14 14
 /** @var ObjectType $rootQueryType */
15 15
 
16 16
 $processor = new Processor();
17 17
 $processor->setSchema(new Schema([
18 18
     'query' => $rootQueryType
19 19
 ]));
20
-$payload  = '{ latestPost { title(truncated: true), summary } }';
20
+$payload = '{ latestPost { title(truncated: true), summary } }';
21 21
 
22 22
 $processor->processRequest($payload);
23
-echo json_encode($processor->getResponseData()) . "\n";
24 23
\ No newline at end of file
24
+echo json_encode($processor->getResponseData())."\n";
25 25
\ No newline at end of file
Please login to merge, or discard this patch.