From: Tim Düsterhus Date: Tue, 14 Jun 2016 20:37:24 +0000 (+0200) Subject: Throw LogicException in places that should be unreachable X-Git-Tag: 3.0.0_Beta_1~1445 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bbb96496363efe074fe5f1266f391cabd2480c03;p=GitHub%2FWoltLab%2FWCF.git Throw LogicException in places that should be unreachable --- diff --git a/wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php b/wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php index 6776f49583..4789bc1115 100644 --- a/wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php +++ b/wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php @@ -100,15 +100,15 @@ class LookupRequestRoute implements IRequestRoute { * @inheritDoc */ public function setIsACP($isACP) { - // lookups are not supported for ACP requests + throw new \BadMethodCallException('lookups are not supported for ACP requests'); } /** * @inheritDoc - * @throws SystemException + * @throws \BadMethodCallException */ public function buildLink(array $components) { - throw new SystemException('LookupRequestRoute cannot build links, please verify capabilities by calling canHandle() first.'); + throw new \BadMethodCallException('LookupRequestRoute cannot build links, please verify capabilities by calling canHandle() first.'); } /** diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php index 581e97a542..8a7129636d 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php @@ -73,7 +73,7 @@ class UserProfileCommentLikeUserNotificationEvent extends AbstractSharedUserNoti * @inheritDoc */ public function getEmailMessage($notificationType = 'instant') { - // not supported + throw new \LogicException('Unreachable'); } /** diff --git a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php index 980375f15f..32a8327547 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php @@ -78,7 +78,7 @@ class UserProfileCommentResponseLikeUserNotificationEvent extends AbstractShared * @inheritDoc */ public function getEmailMessage($notificationType = 'instant') { - // not supported + throw new \LogicException('Unreachable'); } /**