diff --git a/Models/Supplier.php b/Models/Supplier.php index 772da44..9afe478 100644 --- a/Models/Supplier.php +++ b/Models/Supplier.php @@ -64,7 +64,7 @@ class Supplier */ public function __construct() { - $this->createdAt = new \DateTime('now'); + $this->createdAt = new \DateTimeImmutable('now'); $this->profile = new Profile(); } @@ -247,7 +247,7 @@ class Supplier * * @since 1.0.0 */ - public function getCreatedAt() : \DateTime + public function getCreatedAt() : \DateTimeInterface { return $this->createdAt; } diff --git a/Models/SupplierMapper.php b/Models/SupplierMapper.php index 4af88e3..c6ffafc 100644 --- a/Models/SupplierMapper.php +++ b/Models/SupplierMapper.php @@ -44,7 +44,7 @@ final class SupplierMapper extends DataMapperAbstract 'suppliermgmt_supplier_type' => ['name' => 'suppliermgmt_supplier_type', 'type' => 'int', 'internal' => 'type'], 'suppliermgmt_supplier_taxid' => ['name' => 'suppliermgmt_supplier_taxid', 'type' => 'int', 'internal' => 'taxId'], 'suppliermgmt_supplier_info' => ['name' => 'suppliermgmt_supplier_info', 'type' => 'string', 'internal' => 'info'], - 'suppliermgmt_supplier_created_at' => ['name' => 'suppliermgmt_supplier_created_at', 'type' => 'DateTime', 'internal' => 'createdAt', 'readonly' => true], + 'suppliermgmt_supplier_created_at' => ['name' => 'suppliermgmt_supplier_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'suppliermgmt_supplier_account' => ['name' => 'suppliermgmt_supplier_account', 'type' => 'int', 'internal' => 'profile'], ];