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,6 +1,6 @@
<?
use Ramsey\Uuid\Uuid;
use Safe\DateTime;
use Safe\DateTimeImmutable;
/**
* @property Array<Payment> $Payments
@ -12,7 +12,7 @@ class User extends Accessor{
public int $UserId;
public ?string $Name = null;
public ?string $Email = null;
public DateTime $Created;
public DateTimeImmutable $Created;
public string $Uuid;
public ?string $PasswordHash = null;
protected ?bool $_IsRegistered = null;
@ -78,7 +78,7 @@ class User extends Accessor{
public function Create(?string $password = null): void{
$uuid = Uuid::uuid4();
$this->Uuid = $uuid->toString();
$this->Created = new DateTime();
$this->Created = new DateTimeImmutable();
$this->PasswordHash = null;
if($password !== null){