From e4e3e64f3a3630f94912f79e5c36f7f48dc16744 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 17 Aug 2018 16:41:02 -0700 Subject: [PATCH] TitleFormatter: Remove indirection from getText() At the end of the day, the output is identical to LinkTarget::getText(). Change-Id: Ifddafb79d7602ba5e368cc40f99c56e22a56d506 --- includes/title/MediaWikiTitleCodec.php | 2 +- includes/title/TitleFormatter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index daa4dd55b5..15f8ff0997 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -174,7 +174,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { * @return string $title->getText() */ public function getText( LinkTarget $title ) { - return $this->formatTitle( false, $title->getText(), '' ); + return $title->getText(); } /** diff --git a/includes/title/TitleFormatter.php b/includes/title/TitleFormatter.php index 4551d75a51..8859066aa5 100644 --- a/includes/title/TitleFormatter.php +++ b/includes/title/TitleFormatter.php @@ -50,7 +50,7 @@ interface TitleFormatter { /** * Returns the title text formatted for display, without namespace of fragment. * - * @note Only minimal normalization is applied. Consider using TitleValue::getText() directly. + * @note Consider using LinkTarget::getText() directly, it's identical. * * @param LinkTarget $title The title to format * -- 2.20.1