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