@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Date: 01.12.15 |
|
| 4 | - * |
|
| 5 | - * @author Portey Vasil <[email protected]> |
|
| 6 | - */ |
|
| 3 | + * Date: 01.12.15 |
|
| 4 | + * |
|
| 5 | + * @author Portey Vasil <[email protected]> |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace Youshido\GraphQL\Parser\Value; |
| 9 | 9 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function validateArguments($field, $query, $request) |
| 27 | 27 | { |
| 28 | - $requiredArguments = array_filter($field->getConfig()->getArguments(), function (InputField $argument) { |
|
| 28 | + $requiredArguments = array_filter($field->getConfig()->getArguments(), function(InputField $argument) { |
|
| 29 | 29 | return $argument->getConfig()->get('required'); |
| 30 | 30 | }); |
| 31 | 31 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | case TypeMap::KIND_INTERFACE: |
| 80 | 80 | return is_object($value) || is_null($value) || is_array($value); |
| 81 | 81 | case TypeMap::KIND_LIST: |
| 82 | - return is_null($value)|| is_array($value) || (is_object($value) && in_array('IteratorAggregate', class_implements($value))); |
|
| 82 | + return is_null($value) || is_array($value) || (is_object($value) && in_array('IteratorAggregate', class_implements($value))); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | return false; |
@@ -24,13 +24,13 @@ |
||
| 24 | 24 | if ($value && $value->getKind() == TypeMap::KIND_ENUM) { |
| 25 | 25 | $data = []; |
| 26 | 26 | foreach ($value->getValues() as $value) { |
| 27 | - if(!array_key_exists('description', $value)){ |
|
| 27 | + if (!array_key_exists('description', $value)) { |
|
| 28 | 28 | $value['description'] = ''; |
| 29 | 29 | } |
| 30 | - if(!array_key_exists('isDeprecated', $value)){ |
|
| 30 | + if (!array_key_exists('isDeprecated', $value)) { |
|
| 31 | 31 | $value['isDeprecated'] = false; |
| 32 | 32 | } |
| 33 | - if(!array_key_exists('deprecationReason', $value)){ |
|
| 33 | + if (!array_key_exists('deprecationReason', $value)) { |
|
| 34 | 34 | $value['deprecationReason'] = ''; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $config |
| 21 | 21 | ->addField('name', TypeMap::TYPE_STRING, [ |
| 22 | - 'resolve' => function ($value, $args) { |
|
| 22 | + 'resolve' => function($value, $args) { |
|
| 23 | 23 | $a = 'asd'; |
| 24 | 24 | } |
| 25 | 25 | ]) |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function isValidValue($value) |
| 46 | 46 | { |
| 47 | - return in_array($value, array_map(function ($item) { return $item['value']; }, $this->getConfig()->get('values'))); |
|
| 47 | + return in_array($value, array_map(function($item) { return $item['value']; }, $this->getConfig()->get('values'))); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | abstract public function getValues(); |