mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Add type hints for remaining classes
This commit is contained in:
parent
d7718218ad
commit
783c09864f
35 changed files with 212 additions and 210 deletions
21
lib/User.php
21
lib/User.php
|
@ -4,19 +4,20 @@ use Safe\DateTime;
|
|||
|
||||
/**
|
||||
* @property Array<Payment> $Payments
|
||||
* @property ?bool $IsRegistered
|
||||
* @property Benefits $Benefits
|
||||
* @property ?array<Payment> $_Payments
|
||||
*/
|
||||
class User extends PropertiesBase{
|
||||
public $UserId;
|
||||
public $Name;
|
||||
public $Email;
|
||||
public $Created;
|
||||
public $Uuid;
|
||||
public $PasswordHash;
|
||||
protected $_IsRegistered = null;
|
||||
public int $UserId;
|
||||
public ?string $Name;
|
||||
public ?string $Email;
|
||||
public DateTime $Created;
|
||||
public string $Uuid;
|
||||
public ?string $PasswordHash;
|
||||
protected ?bool $_IsRegistered = null;
|
||||
protected $_Payments = null;
|
||||
protected $_Benefits = null;
|
||||
|
||||
protected ?Benefits $_Benefits = null;
|
||||
|
||||
// *******
|
||||
// GETTERS
|
||||
|
@ -59,7 +60,7 @@ class User extends PropertiesBase{
|
|||
return $this->_Benefits;
|
||||
}
|
||||
|
||||
protected function GetIsRegistered(): bool{
|
||||
protected function GetIsRegistered(): ?bool{
|
||||
if($this->_IsRegistered === null){
|
||||
// A user is "registered" if they have a benefits entry in the table.
|
||||
// This function will fill it out for us.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue