Remove erroneously implemented methods
authorMatthias Schmidt <gravatronics@live.com>
Sat, 5 Aug 2017 08:16:05 +0000 (10:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 5 Aug 2017 08:16:05 +0000 (10:16 +0200)
… that never actually returned the incorrect object type as the correct
object type has always already been previously set via
`setObjectType()`.

wcfsetup/install/files/lib/data/comment/LikeableComment.class.php
wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponse.class.php
wcfsetup/install/files/lib/data/like/object/ILikeObject.class.php

index a73882e9414c659041d71fc2025122b33b086222..88c08bdf4a190e04676f89dba34bdee96f7f500c 100644 (file)
@@ -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
         */
index 6907e51ee3e224e935a3ee158b2bba7a83469bc3..9742a4f1038db18f7975d5d8df278f7fbfef4dd0 100644 (file)
@@ -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
         */
index 31e758d117cdc53b9b7701d1f57cf5876ddae9dc..3786337ecc0f3ac7559c5c82c9411306bc20dd6b 100644 (file)
@@ -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
         */