Completed
Push — master ( 5882cd...69f7ce )
by Alexandr
03:28
created
examples/02_blog/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\Processor;
7 7
 use Youshido\GraphQL\Schema;
8 8
 
9
-require_once __DIR__ . '/schema-bootstrap.php';
9
+require_once __DIR__.'/schema-bootstrap.php';
10 10
 /** @var Schema $schema */
11 11
 $schema = new BlogSchema();
12 12
 
@@ -21,4 +21,4 @@  discard block
 block discarded – undo
21 21
 $payload = 'mutation { createPost(author: "Alex", post: {title: "Hey, this is my new post", summary: "my post" }) { title } }';
22 22
 
23 23
 $processor->processRequest($payload);
24
-echo json_encode($processor->getResponseData()) . "\n";
24
+echo json_encode($processor->getResponseData())."\n";
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;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                 }
247 247
             } elseif ($field->getType()->getKind() == TypeMap::KIND_NON_NULL) {
248 248
                 if (!$field->getType()->isValidValue($preResolvedValue)) {
249
-                    $this->resolveValidator->addError(new ResolveException(sprintf('Cannot return null for non-nullable field %s', $astField->getName() . '.' . $field->getName())));
249
+                    $this->resolveValidator->addError(new ResolveException(sprintf('Cannot return null for non-nullable field %s', $astField->getName().'.'.$field->getName())));
250 250
                 } elseif (!$field->getType()->getNullableType()->isValidValue($preResolvedValue)) {
251 251
                     $this->resolveValidator->addError(new ResolveException(sprintf('Not valid value for %s field %s', $field->getType()->getNullableType()->getKind(), $field->getName())));
252 252
                     $value = null;
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     protected function getPropertyValue($data, $path)
358 358
     {
359 359
         if (is_object($data)) {
360
-            $getter = 'get' . $this->classify($path);
360
+            $getter = 'get'.$this->classify($path);
361 361
 
362 362
             return is_callable([$data, $getter]) ? $data->$getter() : null;
363 363
         } elseif (is_array($data)) {
Please login to merge, or discard this patch.