From 8ddb6a8bbb49fe46b87bb10c25925f9c51572f50 Mon Sep 17 00:00:00 2001 From: addshore Date: Wed, 3 Feb 2016 17:22:35 +0100 Subject: [PATCH] phpdoc @return MediaWikiTitleCodec in Title::getTitleParser This will always return a MediaWikiTitleCodec object. This is called in Title::secureAndSplit which expects the method splitTitleString which is only in this implementation and not the interface Change-Id: Ibb6cdcf7deb6c1080e320379aa58981e9935ca33 --- includes/Title.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 55c7179276..50721afd42 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -161,9 +161,9 @@ class Title implements LinkTarget { * Avoid usage of this singleton by using TitleValue * and the associated services when possible. * - * @return TitleParser + * @return MediaWikiTitleCodec */ - private static function getTitleParser() { + private static function getMediaWikiTitleCodec() { global $wgContLang, $wgLocalInterwikis; static $titleCodec = null; @@ -200,9 +200,9 @@ class Title implements LinkTarget { * @return TitleFormatter */ private static function getTitleFormatter() { - // NOTE: we know that getTitleParser() returns a MediaWikiTitleCodec, + // NOTE: we know that getMediaWikiTitleCodec() returns a MediaWikiTitleCodec, // which implements TitleFormatter. - return self::getTitleParser(); + return self::getMediaWikiTitleCodec(); } function __construct() { @@ -3353,7 +3353,7 @@ class Title implements LinkTarget { // @note: splitTitleString() is a temporary hack to allow MediaWikiTitleCodec to share // the parsing code with Title, while avoiding massive refactoring. // @todo: get rid of secureAndSplit, refactor parsing code. - $titleParser = self::getTitleParser(); + $titleParser = self::getMediaWikiTitleCodec(); // MalformedTitleException can be thrown here $parts = $titleParser->splitTitleString( $dbkey, $this->getDefaultNamespace() ); -- 2.20.1