throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid');
}
- if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) {
+ if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
throw new UnexpectedTypeException($value, 'string');
}
}
// Check version
- if (!in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) {
+ if (!\in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) {
$this->context->buildViolation($constraint->message)
->setParameter('{{ value }}', $this->formatValue($value))
->setCode(Uuid::INVALID_VERSION_ERROR)