Switch from DateTime to DateTimeImmutable across codebase

This commit is contained in:
Alex Cabal 2024-04-13 14:05:14 -05:00
parent 92c647f2b1
commit e55fecaaa2
35 changed files with 102 additions and 99 deletions

View file

@ -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(?,