@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function testInternalVariableArgument() |
| 17 | 17 | { |
| 18 | - $schema = new Schema([ |
|
| 18 | + $schema = new Schema([ |
|
| 19 | 19 | 'query' => new ObjectType([ |
| 20 | 20 | 'name' => 'RootQuery', |
| 21 | 21 | 'fields' => [ |
@@ -32,10 +32,10 @@ discard block |
||
| 32 | 32 | 'args' => [ |
| 33 | 33 | 'size' => new NonNullType(new IntType()), |
| 34 | 34 | ], |
| 35 | - 'resolve' => function ($source, $args) { |
|
| 35 | + 'resolve' => function($source, $args) { |
|
| 36 | 36 | $res = []; |
| 37 | 37 | foreach (range(1, $args['size']) as $i) { |
| 38 | - $res[] = 'Cursor #' . $i; |
|
| 38 | + $res[] = 'Cursor #'.$i; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return $res; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | 'args' => [ |
| 49 | 49 | 'first' => new IntType(), |
| 50 | 50 | ], |
| 51 | - 'resolve' => function () { |
|
| 51 | + 'resolve' => function() { |
|
| 52 | 52 | return [ |
| 53 | 53 | 'pageInfo' => [ |
| 54 | 54 | 'totalEdges' => 10, |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | |
| 21 | 21 | |
| 22 | - $schema = new Schema([ |
|
| 22 | + $schema = new Schema([ |
|
| 23 | 23 | 'query' => new ObjectType([ |
| 24 | 24 | 'name' => 'RootQuery', |
| 25 | 25 | 'fields' => [ |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | ] |
| 48 | 48 | ])) |
| 49 | 49 | ], |
| 50 | - 'resolve' => function ($source, $args) { |
|
| 50 | + 'resolve' => function($source, $args) { |
|
| 51 | 51 | return [ |
| 52 | 52 | 'id' => '1', |
| 53 | 53 | 'name' => sprintf('Meeting with %d beans', count($args['related_beans'])), |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | $typeConfig = $this->getConfig(); |
| 57 | - $requiredFields = array_filter($typeConfig->getFields(), function (FieldInterface $field) { |
|
| 57 | + $requiredFields = array_filter($typeConfig->getFields(), function(FieldInterface $field) { |
|
| 58 | 58 | return $field->getType()->getKind() == TypeMap::KIND_NON_NULL; |
| 59 | 59 | }); |
| 60 | 60 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public function parseValue($value) |
| 88 | 88 | { |
| 89 | 89 | if (is_null($value)) return null; |
| 90 | - if($value instanceof InputObject) { |
|
| 90 | + if ($value instanceof InputObject) { |
|
| 91 | 91 | $value = $value->getValue(); |
| 92 | 92 | } |
| 93 | 93 | |
@@ -86,7 +86,9 @@ |
||
| 86 | 86 | |
| 87 | 87 | public function parseValue($value) |
| 88 | 88 | { |
| 89 | - if (is_null($value)) return null; |
|
| 89 | + if (is_null($value)) { |
|
| 90 | + return null; |
|
| 91 | + } |
|
| 90 | 92 | if($value instanceof InputObject) { |
| 91 | 93 | $value = $value->getValue(); |
| 92 | 94 | } |