Code Duplication    Length = 6-7 lines in 2 locations

src/Execution/Processor.php 2 locations

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