From 2bf8d875dea89499d59c576ec6aa394e0f845f3a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 5 Aug 2017 10:16:05 +0200 Subject: [PATCH] Remove erroneously implemented methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … that never actually returned the incorrect object type as the correct object type has always already been previously set via `setObjectType()`. --- .../files/lib/data/comment/LikeableComment.class.php | 12 ------------ .../response/LikeableCommentResponse.class.php | 12 ------------ .../files/lib/data/like/object/ILikeObject.class.php | 4 ++-- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php b/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php index a73882e941..88c08bdf4a 100644 --- a/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php +++ b/wcfsetup/install/files/lib/data/comment/LikeableComment.class.php @@ -2,7 +2,6 @@ namespace wcf\data\comment; use wcf\data\like\object\AbstractLikeObject; use wcf\data\like\Like; -use wcf\data\object\type\ObjectTypeCache; use wcf\system\comment\CommentHandler; use wcf\system\user\notification\object\LikeUserNotificationObject; use wcf\system\user\notification\UserNotificationHandler; @@ -46,17 +45,6 @@ class LikeableComment extends AbstractLikeObject { return $this->userID; } - /** - * @inheritDoc - */ - public function getObjectType() { - if ($this->objectType === null) { - $this->objectType = ObjectTypeCache::getInstance()->getObjectType($this->getDecoratedObject()->objectTypeID); - } - - return $this->objectType; - } - /** * @inheritDoc */ diff --git a/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php b/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php index 6907e51ee3..9742a4f103 100644 --- a/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php +++ b/wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php @@ -3,7 +3,6 @@ namespace wcf\data\comment\response; use wcf\data\comment\Comment; use wcf\data\like\object\AbstractLikeObject; use wcf\data\like\Like; -use wcf\data\object\type\ObjectTypeCache; use wcf\system\comment\CommentHandler; use wcf\system\user\notification\object\LikeUserNotificationObject; use wcf\system\user\notification\UserNotificationHandler; @@ -26,17 +25,6 @@ class LikeableCommentResponse extends AbstractLikeObject { */ protected static $baseClass = CommentResponse::class; - /** - * @inheritDoc - */ - public function getObjectType() { - if ($this->objectType === null) { - $this->objectType = ObjectTypeCache::getInstance()->getObjectType($this->getDecoratedObject()->objectTypeID); - } - - return $this->objectType; - } - /** * @inheritDoc */ diff --git a/wcfsetup/install/files/lib/data/like/object/ILikeObject.class.php b/wcfsetup/install/files/lib/data/like/object/ILikeObject.class.php index 31e758d117..3786337ecc 100644 --- a/wcfsetup/install/files/lib/data/like/object/ILikeObject.class.php +++ b/wcfsetup/install/files/lib/data/like/object/ILikeObject.class.php @@ -36,7 +36,7 @@ interface ILikeObject extends IDatabaseObjectProcessor, ITitledObject { public function getObjectID(); /** - * Returns the object type. + * Returns the likeable object type previously set via `setObjectType()`. * * @return ObjectType */ @@ -50,7 +50,7 @@ interface ILikeObject extends IDatabaseObjectProcessor, ITitledObject { public function updateLikeCounter($cumulativeLikes); /** - * Sets the object type. + * Sets the likable object type. * * @param ObjectType $objectType */ -- 2.20.1