Code Duplication    Length = 5-5 lines in 2 locations

src/Processor.php 2 locations

@@ 176-180 (lines=5) @@
173
174
        $resolvedValue = $this->resolveValue($field, null, $mutation);
175
176
        if (!$this->resolveValidator->validateResolvedValue($resolvedValue, $field->getType())) {
177
            $this->resolveValidator->addError(new ResolveException(sprintf('Not valid resolved value for mutation "%s"', $field->getType()->getName())));
178
179
            return [$alias => null];
180
        }
181
182
        $value = $resolvedValue;
183
        if ($mutation->hasFields()) {
@@ 276-280 (lines=5) @@
273
            return $resolvedValue;
274
        }
275
276
        if (!$this->resolveValidator->validateResolvedValue($resolvedValue, $field->getType())) {
277
            $this->resolveValidator->addError(new ResolveException(sprintf('Not valid resolved value for query "%s"', $field->getType()->getName())));
278
279
            return null;
280
        }
281
282
        return $this->collectListOrSingleValue($field->getType(), $resolvedValue, $query);
283
    }