* @file
* @ingroup Watchlist
*/
+use MediaWiki\Linker\LinkTarget;
/**
* Representation of a pair of user and title for watchlist entries.
*/
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;
}