mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -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,8 +10,8 @@ class Patron extends Accessor{
|
|||
public bool $IsAnonymous;
|
||||
public ?string $AlternateName = null;
|
||||
public bool $IsSubscribedToEmails;
|
||||
public ?DateTime $Created = null;
|
||||
public ?DateTime $Ended = null;
|
||||
public ?DateTimeImmutable $Created = null;
|
||||
public ?DateTimeImmutable $Ended = null;
|
||||
|
||||
|
||||
// *******
|
||||
|
@ -19,7 +19,7 @@ class Patron extends Accessor{
|
|||
// *******
|
||||
|
||||
public function Create(): void{
|
||||
$this->Created = new DateTime();
|
||||
$this->Created = new DateTimeImmutable();
|
||||
Db::Query('
|
||||
INSERT into Patrons (Created, UserId, IsAnonymous, AlternateName, IsSubscribedToEmails)
|
||||
values(?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue