Code Duplication    Length = 4-5 lines in 2 locations

src/Validator/ResolveValidator/ResolveValidator.php 2 locations

@@ 113-117 (lines=5) @@
110
                $values = [$values];
111
            }
112
            foreach ($values as $value) {
113
                if (!$argumentType->isValidValue($argumentType->parseValue($value))) {
114
                    $this->executionContext->addError(new ResolveException(sprintf('Not valid type for argument "%s" in query "%s"', $argument->getName(), $field->getName())));
115
116
                    return false;
117
                }
118
            }
119
120
            if (array_key_exists($argument->getName(), $requiredArguments)) {
@@ 204-207 (lines=4) @@
201
            $fieldType = $this->resolveTypeIfAbstract($fieldType->getNullableType(), $value);
202
        }
203
204
        if (!is_null($value) && !$fieldType->isValidValue($value)) {
205
            $this->executionContext->addError(new ResolveException(sprintf('Not valid value for %s field %s', $fieldType->getNullableType()->getKind(), $field->getName())));
206
207
            return null;
208
        }
209
210
        return true;