Completed
Push — master ( b8b3e7...397b3b )
by Portey
05:40
created
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.
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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $preResolvedValue = $this->getPreResolvedValue($contextValue, $query);
155 155
 
156 156
             if ($field->getConfig()->getType()->getKind() == TypeMap::KIND_LIST) {
157
-                if(!is_array($preResolvedValue)){
157
+                if (!is_array($preResolvedValue)) {
158 158
                     $value = null;
159 159
                     $this->resolveValidator->addError(new ResolveException('Not valid resolve value for list type'));
160 160
                 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
                     if ($type->getKind() == TypeMap::KIND_ENUM) {
169 169
                         /** @var $type AbstractEnumType */
170
-                        if(!$type->isValidValue($resolvedValueItem)) {
170
+                        if (!$type->isValidValue($resolvedValueItem)) {
171 171
                             $this->resolveValidator->addError(new ResolveException('Not valid value for enum type'));
172 172
 
173 173
                             $listValue = null;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                 $value = $listValue;
185 185
             } else {
186 186
                 if ($field->getType()->getKind() == TypeMap::KIND_ENUM) {
187
-                    if(!$field->getType()->isValidValue($preResolvedValue)) {
187
+                    if (!$field->getType()->isValidValue($preResolvedValue)) {
188 188
                         $this->resolveValidator->addError(new ResolveException('Not valid value for enum type'));
189 189
                         $value = null;
190 190
                     } else {
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
                         $value[] = [];
216 216
                         $index   = count($value) - 1;
217 217
 
218
-                        if($field->getConfig()->getType()->getConfig()->getItem()->getKind() == TypeMap::KIND_UNION) {
218
+                        if ($field->getConfig()->getType()->getConfig()->getItem()->getKind() == TypeMap::KIND_UNION) {
219 219
                             $type = $field->getConfig()->getType()->getConfig()->getItemConfig()->resolveType($resolvedValueItem);
220
-                        } elseif($field->getConfig()->getType()->getConfig()->getItem()->getKind() == TypeMap::KIND_INTERFACE) {
220
+                        } elseif ($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.
src/Type/Config/Traits/FieldsAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function addFields($fieldsArray)
42 42
     {
43
-        foreach($fieldsArray as $fieldName => $fieldConfig) {
43
+        foreach ($fieldsArray as $fieldName => $fieldConfig) {
44 44
             if (is_object($fieldConfig)) {
45 45
                 $this->addField($fieldName, $fieldConfig);
46 46
             } else {
Please login to merge, or discard this patch.
Tests/Type/Config/EnumTypeConfigTest.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: 07.12.15
4
- *
5
- * @author Portey Vasil <[email protected]>
6
- */
3
+     * Date: 07.12.15
4
+     *
5
+     * @author Portey Vasil <[email protected]>
6
+     */
7 7
 
8 8
 namespace Youshido\Tests\Type\Config;
9 9
 
Please login to merge, or discard this patch.