Code Duplication    Length = 5-5 lines in 2 locations

src/Processor.php 2 locations

@@ 107-111 (lines=5) @@
104
        $alias         = $mutation->hasAlias() ? $mutation->getAlias() : $mutation->getName();
105
        $resolvedValue = $this->resolveValue($field, null, $mutation);
106
107
        if (!$this->resolveValidator->validateResolvedValue($resolvedValue, $field->getType()->getKind())) {
108
            $this->resolveValidator->addError(new ResolveException(sprintf('Not valid resolved value for mutation "%s"', $field->getType()->getName())));
109
110
            return [$alias => null];
111
        }
112
113
        $value = null;
114
        if ($mutation->hasFields()) {
@@ 167-171 (lines=5) @@
164
165
            $alias = $query->hasAlias() ? $query->getAlias() : $query->getName();
166
167
            if (!$this->resolveValidator->validateResolvedValue($resolvedValue, $field->getType()->getKind())) {
168
                $this->resolveValidator->addError(new ResolveException(sprintf('Not valid resolved value for query "%s"', $field->getType()->getName())));
169
170
                return [$alias => null];
171
            }
172
173
            $value = [];
174
            if($resolvedValue){