mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Style tweaks for getters and add more type hinting
This commit is contained in:
parent
9e31ed1aac
commit
50efeb05d1
13 changed files with 87 additions and 84 deletions
|
@ -132,6 +132,9 @@ class NewsletterSubscription extends Accessor{
|
|||
// ORM METHODS
|
||||
// ***********
|
||||
|
||||
/**
|
||||
* @throws Exceptions\NewsletterSubscriptionNotFoundException
|
||||
*/
|
||||
public static function Get(?string $uuid): NewsletterSubscription{
|
||||
if($uuid === null){
|
||||
throw new Exceptions\NewsletterSubscriptionNotFoundException();
|
||||
|
@ -144,10 +147,6 @@ class NewsletterSubscription extends Accessor{
|
|||
where u.Uuid = ?
|
||||
', [$uuid], 'NewsletterSubscription');
|
||||
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\NewsletterSubscriptionNotFoundException();
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
return $result[0] ?? throw new Exceptions\NewsletterSubscriptionNotFoundException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue