mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Switch from DateTime to DateTimeImmutable across codebase
This commit is contained in:
parent
92c647f2b1
commit
e55fecaaa2
35 changed files with 102 additions and 99 deletions
|
@ -1,5 +1,5 @@
|
|||
<?
|
||||
use Safe\DateTime;
|
||||
use Safe\DateTimeImmutable;
|
||||
|
||||
/**
|
||||
* @property User $User
|
||||
|
@ -10,7 +10,7 @@ class NewsletterSubscription extends Accessor{
|
|||
public bool $IsSubscribedToSummary = false;
|
||||
public bool $IsSubscribedToNewsletter = false;
|
||||
public ?int $UserId = null;
|
||||
public DateTime $Created;
|
||||
public DateTimeImmutable $Created;
|
||||
protected $_User;
|
||||
protected $_Url = null;
|
||||
|
||||
|
@ -44,7 +44,7 @@ class NewsletterSubscription extends Accessor{
|
|||
}
|
||||
|
||||
$this->UserId = $this->User->UserId;
|
||||
$this->Created = new DateTime();
|
||||
$this->Created = new DateTimeImmutable();
|
||||
|
||||
try{
|
||||
Db::Query('
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue