Code Duplication    Length = 4-5 lines in 2 locations

src/Validator/ResolveValidator/ResolveValidator.php 2 locations

@@ 104-108 (lines=5) @@
101
102
            }
103
104
            if (!$argumentType->isValidValue($argumentType->parseValue($argument->getValue()->getValue()))) {
105
                $this->executionContext->addError(new ResolveException(sprintf('Not valid type for argument "%s" in query "%s"', $argument->getName(), $field->getName())));
106
107
                return false;
108
            }
109
110
            if (array_key_exists($argument->getName(), $requiredArguments)) {
111
                unset($requiredArguments[$argument->getName()]);
@@ 183-186 (lines=4) @@
180
            $fieldType = $this->resolveTypeIfAbstract($fieldType->getNullableType(), $value);
181
        }
182
183
        if (!is_null($value) && !$fieldType->isValidValue($value)) {
184
            $this->executionContext->addError(new ResolveException(sprintf('Not valid value for %s field %s', $fieldType->getNullableType()->getKind(), $field->getName())));
185
            return null;
186
        }
187
        return true;
188
    }
189