diff --git a/Models/Item.php b/Models/Item.php index 7946987..db13715 100644 --- a/Models/Item.php +++ b/Models/Item.php @@ -69,7 +69,7 @@ class Item */ public function __construct() { - $this->createdAt = new \DateTime('now'); + $this->createdAt = new \DateTimeImmutable('now'); } /** @@ -91,7 +91,7 @@ class Item * * @since 1.0.0 */ - public function getCreatedAt() : \DateTime + public function getCreatedAt() : \DateTimeInterface { return $this->createdAt; }