Throw LogicException in places that should be unreachable
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 14 Jun 2016 20:37:24 +0000 (22:37 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 14 Jun 2016 20:37:45 +0000 (22:37 +0200)
wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentLikeUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/UserProfileCommentResponseLikeUserNotificationEvent.class.php

index 6776f49583221d2891c13567bfac8b51c2bde898..4789bc1115d1b1f87e4dda34bb5e9d64f7a8bf11 100644 (file)
@@ -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.');
        }
        
        /**
index 581e97a542f1febd6b6783df691c5807f1137a54..8a7129636d8cc2ea4590f6cbbe7adf7fcbe67173 100644 (file)
@@ -73,7 +73,7 @@ class UserProfileCommentLikeUserNotificationEvent extends AbstractSharedUserNoti
         * @inheritDoc
         */
        public function getEmailMessage($notificationType = 'instant') {
-               // not supported
+               throw new \LogicException('Unreachable');
        }
        
        /**
index 980375f15fd2bf0f9f7e6b660420a686ad934127..32a83275474c9da7e25ebead642a8ca1319fbf78 100644 (file)
@@ -78,7 +78,7 @@ class UserProfileCommentResponseLikeUserNotificationEvent extends AbstractShared
         * @inheritDoc
         */
        public function getEmailMessage($notificationType = 'instant') {
-               // not supported
+               throw new \LogicException('Unreachable');
        }
        
        /**