Code Duplication    Length = 6-7 lines in 2 locations

src/Execution/Processor.php 2 locations

@@ 143-149 (lines=7) @@
140
141
                    return $this->resolveScalar($targetField, $ast, $parentValue);
142
143
                case TypeMap::KIND_OBJECT:
144
                    /** @var $type AbstractObjectType */
145
                    if (!$ast instanceof AstQuery) {
146
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
147
                    }
148
149
                    return $this->resolveObject($targetField, $ast, $parentValue);
150
151
                case TypeMap::KIND_LIST:
152
                    return $this->resolveList($targetField, $ast, $parentValue);
@@ 155-160 (lines=6) @@
152
                    return $this->resolveList($targetField, $ast, $parentValue);
153
154
                case TypeMap::KIND_UNION:
155
                case TypeMap::KIND_INTERFACE:
156
                    if (!$ast instanceof AstQuery) {
157
                        throw new ResolveException(sprintf('You have to specify fields for "%s"', $ast->getName()), $ast->getLocation());
158
                    }
159
160
                    return $this->resolveComposite($targetField, $ast, $parentValue);
161
162
                default:
163
                    throw new ResolveException(sprintf('Resolving type with kind "%s" not supported', $kind));