mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -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
|
||||
|
@ -8,7 +8,7 @@ use Safe\DateTime;
|
|||
*/
|
||||
class PollVote extends Accessor{
|
||||
public int $UserId;
|
||||
public DateTime $Created;
|
||||
public DateTimeImmutable $Created;
|
||||
public ?int $PollItemId = null;
|
||||
protected ?User $_User = null;
|
||||
protected ?PollItem $_PollItem = null;
|
||||
|
@ -98,7 +98,7 @@ class PollVote extends Accessor{
|
|||
}
|
||||
|
||||
$this->Validate();
|
||||
$this->Created = new DateTime();
|
||||
$this->Created = new DateTimeImmutable();
|
||||
Db::Query('
|
||||
INSERT into PollVotes (UserId, PollItemId, Created)
|
||||
values (?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue