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)) {
@@ 197-200 (lines=4) @@
194
            $fieldType = $this->resolveTypeIfAbstract($fieldType->getNullableType(), $value);
195
        }
196
197
        if (!is_null($value) && !$fieldType->isValidValue($value)) {
198
            $this->executionContext->addError(new ResolveException(sprintf('Not valid value for %s field %s', $fieldType->getNullableType()->getKind(), $field->getName())));
199
200
            return null;
201
        }
202
203
        return true;