TitleFormatter: Remove indirection from getText()
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 17 Aug 2018 23:41:02 +0000 (16:41 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 18 Aug 2018 00:10:46 +0000 (17:10 -0700)
At the end of the day, the output is identical to LinkTarget::getText().

Change-Id: Ifddafb79d7602ba5e368cc40f99c56e22a56d506

includes/title/MediaWikiTitleCodec.php
includes/title/TitleFormatter.php

index daa4dd5..15f8ff0 100644 (file)
@@ -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();
        }
 
        /**
index 4551d75..8859066 100644 (file)
@@ -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
         *