Code Duplication    Length = 6-7 lines in 2 locations

src/Execution/Processor.php 2 locations

@@ 156-162 (lines=7) @@
153
154
                    return $this->resolveScalar($targetField, $ast, $parentValue);
155
156
                case TypeMap::KIND_OBJECT:
157
                    /** @var $type AbstractObjectType */
158
                    if (!$ast instanceof AstQuery) {
159
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
160
                    }
161
162
                    return $this->resolveObject($targetField, $ast, $parentValue);
163
164
                case TypeMap::KIND_LIST:
165
                    return $this->resolveList($targetField, $ast, $parentValue);
@@ 168-173 (lines=6) @@
165
                    return $this->resolveList($targetField, $ast, $parentValue);
166
167
                case TypeMap::KIND_UNION:
168
                case TypeMap::KIND_INTERFACE:
169
                    if (!$ast instanceof AstQuery) {
170
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
171
                    }
172
173
                    return $this->resolveComposite($targetField, $ast, $parentValue);
174
175
                default:
176
                    throw new ResolveException(sprintf('Resolving type with kind "%s" not supported', $kind));