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,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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue