@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | if (!count($field->getArguments())) return true; |
| 63 | 63 | |
| 64 | - $requiredArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
| 64 | + $requiredArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
| 65 | 65 | return $argument->getType()->getKind() == TypeMap::KIND_NON_NULL; |
| 66 | 66 | }); |
| 67 | 67 | |
| 68 | - $withDefaultArguments = array_filter($field->getArguments(), function (InputField $argument) { |
|
| 68 | + $withDefaultArguments = array_filter($field->getArguments(), function(InputField $argument) { |
|
| 69 | 69 | return $argument->getConfig()->get('default') !== null; |
| 70 | 70 | }); |
| 71 | 71 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | public function assertTypeImplementsInterface(AbstractType $type, AbstractInterfaceType $interface) |
| 134 | 134 | { |
| 135 | 135 | if (!$interface->isValidValue($type)) { |
| 136 | - throw new ResolveException('Type ' . $type->getName() . ' does not implement ' . $interface->getName()); |
|
| 136 | + throw new ResolveException('Type '.$type->getName().' does not implement '.$interface->getName()); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if (!$valid) { |
| 155 | - throw new ResolveException('Type ' . $type->getName() . ' not exist in types of ' . $unionType->getName()); |
|
| 155 | + throw new ResolveException('Type '.$type->getName().' not exist in types of '.$unionType->getName()); |
|
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
@@ -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; |