mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-06 23:38:41 +00:00
implement immutable datetime
This commit is contained in:
parent
6438c075df
commit
4b181a9a9e
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user