mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
More type hinting
This commit is contained in:
parent
cb79832092
commit
1c3640fab6
6 changed files with 56 additions and 29 deletions
|
@ -72,17 +72,27 @@ class Artwork extends PropertiesBase{
|
|||
return $this->_UrlName;
|
||||
}
|
||||
|
||||
protected function GetSubmitter(): User{
|
||||
protected function GetSubmitter(): ?User{
|
||||
if($this->_Submitter === null){
|
||||
$this->_Submitter = User::Get($this->SubmitterUserId);
|
||||
try{
|
||||
$this->_Submitter = User::Get($this->SubmitterUserId);
|
||||
}
|
||||
catch(Exceptions\InvalidUserException){
|
||||
// Return null
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_Submitter;
|
||||
}
|
||||
|
||||
protected function GetReviewer(): User{
|
||||
protected function GetReviewer(): ?User{
|
||||
if($this->_Reviewer === null){
|
||||
$this->_Reviewer = User::Get($this->ReviewerUserId);
|
||||
try{
|
||||
$this->_Reviewer = User::Get($this->ReviewerUserId);
|
||||
}
|
||||
catch(Exceptions\InvalidUserException){
|
||||
// Return null
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_Reviewer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue