mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-21 21:30:08 +00:00
Remove obsolete instanceof \Exception
check in Room
This commit is contained in:
parent
aed4a71643
commit
fcd9b3f62b
@ -110,7 +110,7 @@ public function canSee(?UserProfile $user = null, ?\Exception &$reason = null):
|
|||||||
EventHandler::getInstance()->fireAction($this, 'canSee', $parameters);
|
EventHandler::getInstance()->fireAction($this, 'canSee', $parameters);
|
||||||
$reason = $parameters['result'];
|
$reason = $parameters['result'];
|
||||||
|
|
||||||
if (!($reason === null || $reason instanceof \Exception || $reason instanceof \Throwable)) {
|
if (!($reason === null || $reason instanceof \Throwable)) {
|
||||||
throw new \DomainException('Result of canSee must be a \Throwable or null.');
|
throw new \DomainException('Result of canSee must be a \Throwable or null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ public function canSeeLog(?UserProfile $user = null, ?\Exception &$reason = null
|
|||||||
EventHandler::getInstance()->fireAction($this, 'canSeeLog', $parameters);
|
EventHandler::getInstance()->fireAction($this, 'canSeeLog', $parameters);
|
||||||
$reason = $parameters['result'];
|
$reason = $parameters['result'];
|
||||||
|
|
||||||
if (!($reason === null || $reason instanceof \Exception || $reason instanceof \Throwable)) {
|
if (!($reason === null || $reason instanceof \Throwable)) {
|
||||||
throw new \DomainException('Result of canSeeLog must be a \Throwable or null.');
|
throw new \DomainException('Result of canSeeLog must be a \Throwable or null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ public function canJoin(?UserProfile $user = null, ?\Exception &$reason = null):
|
|||||||
EventHandler::getInstance()->fireAction($this, 'canJoin', $parameters);
|
EventHandler::getInstance()->fireAction($this, 'canJoin', $parameters);
|
||||||
$reason = $parameters['result'];
|
$reason = $parameters['result'];
|
||||||
|
|
||||||
if (!($reason === null || $reason instanceof \Exception || $reason instanceof \Throwable)) {
|
if (!($reason === null || $reason instanceof \Throwable)) {
|
||||||
throw new \DomainException('Result of canJoin must be a \Throwable or null.');
|
throw new \DomainException('Result of canJoin must be a \Throwable or null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ public function canWritePublicly(?UserProfile $user = null, ?\Exception &$reason
|
|||||||
EventHandler::getInstance()->fireAction($this, 'canWritePublicly', $parameters);
|
EventHandler::getInstance()->fireAction($this, 'canWritePublicly', $parameters);
|
||||||
$reason = $parameters['result'];
|
$reason = $parameters['result'];
|
||||||
|
|
||||||
if (!($reason === null || $reason instanceof \Exception || $reason instanceof \Throwable)) {
|
if (!($reason === null || $reason instanceof \Throwable)) {
|
||||||
throw new \DomainException('Result of canWritePublicly must be a \Throwable or null.');
|
throw new \DomainException('Result of canWritePublicly must be a \Throwable or null.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user