$this->notInRangeMessage =
$notInRangeMessage ??
$this->notInRangeMessage;
$this->minMessage =
$minMessage ??
$this->minMessage;
$this->maxMessage =
$maxMessage ??
$this->maxMessage;
$this->invalidMessage =
$invalidMessage ??
$this->invalidMessage;
$this->invalidDateTimeMessage =
$invalidDateTimeMessage ??
$this->invalidDateTimeMessage;
$this->min =
$min ??
$this->min;
$this->minPropertyPath =
$minPropertyPath ??
$this->minPropertyPath;
$this->max =
$max ??
$this->max;
$this->maxPropertyPath =
$maxPropertyPath ??
$this->maxPropertyPath;
if (null ===
$this->min && null ===
$this->minPropertyPath && null ===
$this->max && null ===
$this->maxPropertyPath
) { throw new MissingOptionsException(sprintf('Either option "min", "minPropertyPath", "max" or "maxPropertyPath" must be given for constraint "%s".', __CLASS__
),
['min', 'minPropertyPath', 'max', 'maxPropertyPath'
]);
} if (null !==
$this->min && null !==
$this->minPropertyPath
) { throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "min" or "minPropertyPath" options to be set, not both.',
static::
class));
} if (null !==
$this->max && null !==
$this->maxPropertyPath
) { throw new ConstraintDefinitionException(sprintf('The "%s" constraint requires only one of the "max" or "maxPropertyPath" options to be set, not both.',
static::
class));
} if ((null !==
$this->minPropertyPath || null !==
$this->maxPropertyPath
) && !
class_exists(PropertyAccess::
class)) {