Code Duplication    Length = 6-7 lines in 2 locations

src/Execution/Processor.php 2 locations

@@ 186-192 (lines=7) @@
183
184
                    return $this->resolveScalar($targetField, $ast, $parentValue);
185
186
                case TypeMap::KIND_OBJECT:
187
                    /** @var $type AbstractObjectType */
188
                    if (!$ast instanceof AstQuery) {
189
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
190
                    }
191
192
                    return $this->resolveObject($targetField, $ast, $parentValue);
193
194
                case TypeMap::KIND_LIST:
195
                    return $this->resolveList($targetField, $ast, $parentValue);
@@ 198-203 (lines=6) @@
195
                    return $this->resolveList($targetField, $ast, $parentValue);
196
197
                case TypeMap::KIND_UNION:
198
                case TypeMap::KIND_INTERFACE:
199
                    if (!$ast instanceof AstQuery) {
200
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
201
                    }
202
203
                    return $this->resolveComposite($targetField, $ast, $parentValue);
204
205
                default:
206
                    throw new ResolveException(sprintf('Resolving type with kind "%s" not supported', $kind));