Skip to content

Commit

Permalink
updated type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Feb 7, 2024
1 parent 8895627 commit ac85794
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/system/CoreBundle/Doctrine/DBAL/Type/UTCDateTimeType.php
Expand Up @@ -24,7 +24,7 @@ class UTCDateTimeType extends DateTimeType
{
private static \DateTimeZone $utc;

public function convertToDatabaseValue($value, AbstractPlatform $platform): mixed
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if ($value instanceof \DateTimeInterface) {
$value->setTimezone(self::getUtc());
Expand All @@ -33,7 +33,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): mixe
return parent::convertToDatabaseValue($value, $platform);
}

public function convertToPHPValue($value, AbstractPlatform $platform): mixed
public function convertToPHPValue($value, AbstractPlatform $platform): ?\DateTime
{
if (null === $value || $value instanceof \DateTimeInterface) {
return $value;
Expand Down

0 comments on commit ac85794

Please sign in to comment.