Code Duplication    Length = 6-7 lines in 2 locations

src/Execution/Processor.php 2 locations

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