try {
$comparedValue = $this->getPropertyAccessor()->getValue($object, $path);
} catch (NoSuchPropertyException $e) {
- throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: %s', $path, get_class($constraint), $e->getMessage()), 0, $e);
+ throw new ConstraintDefinitionException(sprintf('Invalid property path "%s" provided to "%s" constraint: %s', $path, \get_class($constraint), $e->getMessage()), 0, $e);
}
} else {
$comparedValue = $constraint->value;
// This allows to compare with any date/time value supported by
// the DateTime constructor:
// http://php.net/manual/en/datetime.formats.php
- if (is_string($comparedValue)) {
+ if (\is_string($comparedValue)) {
if ($value instanceof \DateTimeImmutable) {
// If $value is immutable, convert the compared value to a
// DateTimeImmutable too