diff --git a/src/Traits/RecoveryStartTimeTrait.php b/src/Traits/RecoveryStartTimeTrait.php index ae01f688..e28e0012 100644 --- a/src/Traits/RecoveryStartTimeTrait.php +++ b/src/Traits/RecoveryStartTimeTrait.php @@ -2,21 +2,21 @@ namespace App\Traits; -use DateTime; +use DateTimeImmutable; use Exception; use Doctrine\ORM\Mapping as ORM; trait RecoveryStartTimeTrait { #[ORM\Column(nullable: true)] - private ?DateTime $recoveryStartTime = null; + private ?DateTimeImmutable $recoveryStartTime = null; - public function getRecoveryStartTime(): ?DateTime + public function getRecoveryStartTime(): ?DateTimeImmutable { return $this->recoveryStartTime; } - public function setRecoveryStartTime(DateTime $recoveryStartTime): void + public function setRecoveryStartTime(DateTimeImmutable $recoveryStartTime): void { $this->recoveryStartTime = $recoveryStartTime; } @@ -26,7 +26,7 @@ public function setRecoveryStartTime(DateTime $recoveryStartTime): void */ public function updateRecoveryStartTime(): void { - $this->setRecoveryStartTime(new DateTime()); + $this->setRecoveryStartTime(new DateTimeImmutable()); } public function eraseRecoveryStartTime(): void