mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 02:21:55 -04:00
Use shorthand assignment for basic getters
This commit is contained in:
parent
99b5fd66f2
commit
7f5ffb4aea
21 changed files with 142 additions and 326 deletions
|
@ -30,11 +30,7 @@ class Payment{
|
|||
* @throws Exceptions\UserNotFoundException
|
||||
*/
|
||||
protected function GetUser(): ?User{
|
||||
if(!isset($this->_User) && $this->UserId !== null){
|
||||
$this->_User = User::Get($this->UserId);
|
||||
}
|
||||
|
||||
return $this->_User;
|
||||
return $this->_User ??= User::Get($this->UserId);
|
||||
}
|
||||
|
||||
protected function GetProcessorUrl(): string{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue