mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Type hinting fixes
This commit is contained in:
parent
e98a650f59
commit
ad0badc09e
7 changed files with 15 additions and 15 deletions
|
@ -2,11 +2,11 @@
|
|||
class Contributor{
|
||||
public string $Name;
|
||||
public string $UrlName;
|
||||
public ?string $SortName;
|
||||
public ?string $WikipediaUrl;
|
||||
public ?string $MarcRole;
|
||||
public ?string $FullName;
|
||||
public ?string $NacoafUrl;
|
||||
public ?string $SortName = null;
|
||||
public ?string $WikipediaUrl = null;
|
||||
public ?string $MarcRole = null;
|
||||
public ?string $FullName = null;
|
||||
public ?string $NacoafUrl = null;
|
||||
|
||||
public function __construct(string $name, string $sortName = null, string $fullName = null, string $wikipediaUrl = null, string $marcRole = null, string $nacoafUrl = null){
|
||||
$this->Name = str_replace('\'', '’', $name);
|
||||
|
|
|
@ -8,7 +8,7 @@ use function Safe\unlink;
|
|||
|
||||
class Image{
|
||||
public string $Path;
|
||||
public ?ImageMimeType $MimeType;
|
||||
public ?ImageMimeType $MimeType = null;
|
||||
|
||||
public function __construct(string $path){
|
||||
$this->Path = $path;
|
||||
|
|
|
@ -16,7 +16,7 @@ class Museum extends PropertiesBase{
|
|||
limit 1;
|
||||
', [$url], 'Museum');
|
||||
|
||||
if(sizeof($result[0]) == 0){
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\MuseumNotFoundException();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ use Safe\DateTime;
|
|||
*/
|
||||
class NewsletterSubscription extends PropertiesBase{
|
||||
public bool $IsConfirmed = false;
|
||||
public bool $IsSubscribedToSummary;
|
||||
public bool $IsSubscribedToNewsletter;
|
||||
public int $UserId;
|
||||
public bool $IsSubscribedToSummary = false;
|
||||
public bool $IsSubscribedToNewsletter = false;
|
||||
public ?int $UserId = null;
|
||||
public DateTime $Created;
|
||||
protected $_User;
|
||||
protected $_Url = null;
|
||||
|
|
|
@ -4,7 +4,7 @@ class OpdsNavigationEntry{
|
|||
public string $Url;
|
||||
public string $Rel;
|
||||
public string $Type;
|
||||
public ?DateTime $Updated;
|
||||
public ?DateTime $Updated = null;
|
||||
public string $Description;
|
||||
public string $Title;
|
||||
public string $SortTitle;
|
||||
|
|
|
@ -8,7 +8,7 @@ class Patron extends PropertiesBase{
|
|||
public ?int $UserId = null;
|
||||
protected $_User = null;
|
||||
public bool $IsAnonymous;
|
||||
public ?string $AlternateName;
|
||||
public ?string $AlternateName = null;
|
||||
public bool $IsSubscribedToEmails;
|
||||
public ?DateTime $Created = null;
|
||||
public ?DateTime $Ended = null;
|
||||
|
|
|
@ -10,11 +10,11 @@ use Safe\DateTime;
|
|||
*/
|
||||
class User extends PropertiesBase{
|
||||
public int $UserId;
|
||||
public ?string $Name;
|
||||
public ?string $Email;
|
||||
public ?string $Name = null;
|
||||
public ?string $Email = null;
|
||||
public DateTime $Created;
|
||||
public string $Uuid;
|
||||
public ?string $PasswordHash;
|
||||
public ?string $PasswordHash = null;
|
||||
protected ?bool $_IsRegistered = null;
|
||||
protected $_Payments = null;
|
||||
protected ?Benefits $_Benefits = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue