/home/techb158/immovalet.com/vendor/doctrine/dbal/src/Types
Edit: /home/techb158/immovalet.com/vendor/doctrine/dbal/src/Types/DateTimeTzImmutableType.php (1591B)
format($platform->getDateTimeTzFormatString());
}
throw ConversionException::conversionFailedInvalidType(
$value,
$this->getName(),
['null', DateTimeImmutable::class]
);
}
/**
* {@inheritdoc}
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if ($value === null || $value instanceof DateTimeImmutable) {
return $value;
}
$dateTime = DateTimeImmutable::createFromFormat($platform->getDateTimeTzFormatString(), $value);
if ($dateTime === false) {
throw ConversionException::conversionFailedFormat(
$value,
$this->getName(),
$platform->getDateTimeTzFormatString()
);
}
return $dateTime;
}
/**
* {@inheritdoc}
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return true;
}
}