mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 02:21:55 -04:00
Refactor HttpInput::Str and rename some exceptions for consistency
This commit is contained in:
parent
2b5f4f55a2
commit
ca3fc6dbfd
54 changed files with 163 additions and 159 deletions
|
@ -100,7 +100,7 @@ class Poll extends PropertiesBase{
|
|||
|
||||
public static function Get(?int $pollId): Poll{
|
||||
if($pollId === null){
|
||||
throw new Exceptions\InvalidPollException();
|
||||
throw new Exceptions\PollNotFoundException();
|
||||
}
|
||||
|
||||
$result = Db::Query('
|
||||
|
@ -110,7 +110,7 @@ class Poll extends PropertiesBase{
|
|||
', [$pollId], 'Poll');
|
||||
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\InvalidPollException();
|
||||
throw new Exceptions\PollNotFoundException();
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
|
@ -118,7 +118,7 @@ class Poll extends PropertiesBase{
|
|||
|
||||
public static function GetByUrlName(?string $urlName): Poll{
|
||||
if($urlName === null){
|
||||
throw new Exceptions\InvalidPollException();
|
||||
throw new Exceptions\PollNotFoundException();
|
||||
}
|
||||
|
||||
$result = Db::Query('
|
||||
|
@ -128,7 +128,7 @@ class Poll extends PropertiesBase{
|
|||
', [$urlName], 'Poll');
|
||||
|
||||
if(sizeof($result) == 0){
|
||||
throw new Exceptions\InvalidPollException();
|
||||
throw new Exceptions\PollNotFoundException();
|
||||
}
|
||||
|
||||
return $result[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue