Code Duplication    Length = 4-5 lines in 2 locations

src/Validator/ResolveValidator/ResolveValidator.php 2 locations

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