Add a bunch of @since tags to Linker
[lhc/web/wiklou.git] / includes / WatchedItem.php
index 0495536..db6ce87 100644 (file)
@@ -18,6 +18,7 @@
  * @file
  * @ingroup Watchlist
  */
+use MediaWiki\Linker\LinkTarget;
 
 /**
  * Representation of a pair of user and title for watchlist entries.
@@ -140,11 +141,7 @@ class WatchedItem {
         */
        public function getTitle() {
                if ( !$this->title ) {
-                       if ( $this->linkTarget instanceof Title ) {
-                               $this->title = $this->linkTarget;
-                       } else {
-                               $this->title = Title::newFromLinkTarget( $this->linkTarget );
-                       }
+                       $this->title = Title::newFromLinkTarget( $this->linkTarget );
                }
                return $this->title;
        }