@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param AbstractObjectType $objectType |
45 | - * @param Mutation|Query|AstField $field |
|
46 | - * @return null |
|
45 | + * @param AstField $field |
|
46 | + * @return boolean |
|
47 | 47 | */ |
48 | 48 | public function objectHasField($objectType, $field) |
49 | 49 | { |
@@ -58,6 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | /** |
60 | 60 | * @inheritdoc |
61 | + * @param Query $query |
|
61 | 62 | */ |
62 | 63 | public function validateArguments(AbstractField $field, $query, Request $request) |
63 | 64 | { |
@@ -148,11 +148,15 @@ |
||
148 | 148 | protected function collectValueForQueryWithType(Query $query, AbstractType $fieldType, $resolvedValue) |
149 | 149 | { |
150 | 150 | $fieldType = $this->resolveValidator->resolveTypeIfAbstract($fieldType, $resolvedValue); |
151 | - if (is_null($resolvedValue)) return null; |
|
151 | + if (is_null($resolvedValue)) { |
|
152 | + return null; |
|
153 | + } |
|
152 | 154 | |
153 | 155 | $value = []; |
154 | 156 | if ($fieldType->getKind() == TypeMap::KIND_LIST) { |
155 | - if (!$this->resolveValidator->hasArrayAccess($resolvedValue)) return null; |
|
157 | + if (!$this->resolveValidator->hasArrayAccess($resolvedValue)) { |
|
158 | + return null; |
|
159 | + } |
|
156 | 160 | foreach ($resolvedValue as $resolvedValueItem) { |
157 | 161 | $value[] = []; |
158 | 162 | $index = count($value) - 1; |