Completed
Push — master ( 4d2ac5...1a75da )
by Portey
03:12
created
src/Definition/InterfaceListType.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Date: 03.12.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 03.12.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\GraphQL\Definition;
9 9
 
Please login to merge, or discard this patch.
src/Definition/Traits/SchemaContainableTrait.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Date: 04.12.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 04.12.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\GraphQL\Definition\Traits;
9 9
 
Please login to merge, or discard this patch.
src/Parser/Tokenizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -226,10 +226,10 @@
 block discarded – undo
226 226
 
227 227
         $value = substr($this->source, $start, $this->pos - $start);
228 228
 
229
-        if(strpos($value, '.') === false){
230
-            $value = (int) $value;
229
+        if (strpos($value, '.') === false) {
230
+            $value = (int)$value;
231 231
         } else {
232
-            $value = (float) $value;
232
+            $value = (float)$value;
233 233
         }
234 234
 
235 235
         return new Token(Token::TYPE_NUMBER, $value);
Please login to merge, or discard this patch.
src/Definition/Traits/TypeCollectorTrait.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Date: 04.12.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 04.12.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\GraphQL\Definition\Traits;
9 9
 
Please login to merge, or discard this patch.
src/Parser/Ast/Fragment.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Date: 23.11.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 23.11.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\GraphQL;
9 9
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     }
62 62
 
63 63
     /**
64
-     * @return Field[]|Query[]
64
+     * @return Query[]
65 65
      */
66 66
     public function getFields()
67 67
     {
Please login to merge, or discard this patch.
src/Parser/Ast/Query.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     }
62 62
 
63 63
     /**
64
-     * @return Field[]|Query[]
64
+     * @return Query[]
65 65
      */
66 66
     public function getFields()
67 67
     {
Please login to merge, or discard this patch.
src/Definition/MutationType.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Date: 03.12.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 03.12.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\GraphQL\Definition;
9 9
 
Please login to merge, or discard this patch.
Tests/Type/ObjectTypeTest.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('kind', 'string')
22 22
             ->addField('description', 'string')
23 23
             ->addField('ofType', new QueryListType(), [
24
-                'resolve' => function () {
24
+                'resolve' => function() {
25 25
                     return [];
26 26
                 }
27 27
             ])
Please login to merge, or discard this patch.
src/Processor.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     /**
190 190
      * @param $objectType InputObjectType|ObjectType
191 191
      * @param $query      Mutation|Query
192
-     * @return null
192
+     * @return boolean
193 193
      */
194 194
     private function checkFieldExist($objectType, $query)
195 195
     {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     }
227 227
 
228 228
     /**
229
-     * @param $field        Field
229
+     * @param Field $field        Field
230 230
      * @param $contextValue mixed
231 231
      * @param $query        Query
232 232
      *
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $preResolvedValue = $this->getPreResolvedValue($contextValue, $query);
157 157
 
158 158
             if ($field->getConfig()->getType()->getKind() == TypeMap::KIND_LIST) {
159
-                if(!is_array($preResolvedValue)){
159
+                if (!is_array($preResolvedValue)) {
160 160
                     $value = null;
161 161
                     $this->resolveValidator->addError(new ResolveException('Not valid resolve value for list type'));
162 162
                 }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
                     if ($type->getKind() == TypeMap::KIND_ENUM) {
171 171
                         /** @var $type AbstractEnumType */
172
-                        if(!$type->isValidValue($resolvedValueItem)) {
172
+                        if (!$type->isValidValue($resolvedValueItem)) {
173 173
                             $this->resolveValidator->addError(new ResolveException('Not valid value for enum type'));
174 174
 
175 175
                             $listValue = null;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 $value = $listValue;
187 187
             } else {
188 188
                 if ($field->getType()->getKind() == TypeMap::KIND_ENUM) {
189
-                    if(!$field->getType()->isValidValue($preResolvedValue)) {
189
+                    if (!$field->getType()->isValidValue($preResolvedValue)) {
190 190
                         $this->resolveValidator->addError(new ResolveException('Not valid value for enum type'));
191 191
                         $value = null;
192 192
                     } else {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                         $value[] = [];
218 218
                         $index   = count($value) - 1;
219 219
 
220
-                        if($field->getConfig()->getType()->getConfig()->getItem()->getKind() == TypeMap::KIND_INTERFACE) {
220
+                        if ($field->getConfig()->getType()->getConfig()->getItem()->getKind() == TypeMap::KIND_INTERFACE) {
221 221
                             $resolvedValueItem = $field->getConfig()->getType()->getConfig()->getItemConfig()->resolveType($resolvedValueItem);
222 222
                             $type = $field->getConfig()->getType()->getConfig()->getItem();
223 223
                         } else {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     {
288 288
         $resolvedValue = $field->getConfig()->resolve($contextValue, $this->parseArgumentsValues($field, $query));
289 289
 
290
-        if($field->getType()->getKind() == TypeMap::KIND_INTERFACE){
290
+        if ($field->getType()->getKind() == TypeMap::KIND_INTERFACE) {
291 291
             $resolvedValue = $field->getType()->resolveType($resolvedValue);
292 292
         }
293 293
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             return [];
307 307
         }
308 308
 
309
-        $args      = [];
309
+        $args = [];
310 310
         foreach ($query->getArguments() as $argument) {
311 311
             $args[$argument->getName()] = $field->getConfig()->getArgument($argument->getName())->getType()->parseValue($argument->getValue()->getValue());
312 312
         }
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
                 foreach ($fragment->getFields() as $fragmentField) {
340 340
                     $value = $this->collectValue($value, $this->executeQuery($fragmentField, $queryType, $resolvedValue));
341 341
                 }
342
-            } else if($field->getName() == self::TYPE_NAME_QUERY) {
342
+            } else if ($field->getName() == self::TYPE_NAME_QUERY) {
343 343
                 $value = $this->collectValue($value, [$field->getAlias() ?: $field->getName() => $queryType->getName()]);
344 344
             } else {
345 345
                 $value = $this->collectValue($value, $this->executeQuery($field, $queryType, $resolvedValue));
Please login to merge, or discard this patch.