Code Duplication    Length = 4-5 lines in 2 locations

src/Validator/ResolveValidator/ResolveValidator.php 2 locations

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