From db2726675c8c4515378ef7e7aae6d8f51607d6ca Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 21 Apr 2014 11:31:49 +0200 Subject: [PATCH] Update formatting of includes/title/ Change-Id: I862dde47b569ca99f098d795e13b1999a33d790b --- includes/title/MalformedTitleException.php | 1 - includes/title/MediaWikiPageLinkRenderer.php | 2 +- includes/title/MediaWikiTitleCodec.php | 6 +++--- includes/title/PageLinkRenderer.php | 2 -- includes/title/TitleFormatter.php | 1 - includes/title/TitleParser.php | 1 - includes/title/TitleValue.php | 3 +-- 7 files changed, 5 insertions(+), 11 deletions(-) diff --git a/includes/title/MalformedTitleException.php b/includes/title/MalformedTitleException.php index 4b14a195f4..a8a5d754a8 100644 --- a/includes/title/MalformedTitleException.php +++ b/includes/title/MalformedTitleException.php @@ -29,5 +29,4 @@ * @author Daniel Kinzler */ class MalformedTitleException extends Exception { - } diff --git a/includes/title/MediaWikiPageLinkRenderer.php b/includes/title/MediaWikiPageLinkRenderer.php index 62ed4c26ab..c593dca30b 100644 --- a/includes/title/MediaWikiPageLinkRenderer.php +++ b/includes/title/MediaWikiPageLinkRenderer.php @@ -28,7 +28,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ class MediaWikiPageLinkRenderer implements PageLinkRenderer { - /** * @var TitleFormatter */ @@ -108,6 +107,7 @@ class MediaWikiPageLinkRenderer implements PageLinkRenderer { // re-implement Linker to use a HtmlPageLinkRenderer. $title = Title::newFromTitleValue( $page ); $link = Linker::link( $title, htmlspecialchars( $text ) ); + return $link; } diff --git a/includes/title/MediaWikiTitleCodec.php b/includes/title/MediaWikiTitleCodec.php index 288c1d9e3a..9c89691087 100644 --- a/includes/title/MediaWikiTitleCodec.php +++ b/includes/title/MediaWikiTitleCodec.php @@ -33,7 +33,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { - /** * @var Language */ @@ -71,7 +70,8 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { */ public function getNamespaceName( $namespace, $text ) { if ( $this->language->needsGenderDistinction() && - MWNamespace::hasGenderDistinction( $namespace ) ) { + MWNamespace::hasGenderDistinction( $namespace ) + ) { //NOTE: we are assuming here that the title text is a user name! $gender = $this->genderCache->getGenderOf( $text, __METHOD__ ); @@ -376,7 +376,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser { # Fill fields $parts['dbkey'] = $dbkey; + return $parts; } - } diff --git a/includes/title/PageLinkRenderer.php b/includes/title/PageLinkRenderer.php index 240a961894..a277594239 100644 --- a/includes/title/PageLinkRenderer.php +++ b/includes/title/PageLinkRenderer.php @@ -31,7 +31,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ interface PageLinkRenderer { - /** * Returns the URL for the given page. * @@ -65,5 +64,4 @@ interface PageLinkRenderer { * @return string */ public function renderWikitextLink( TitleValue $page, $text = null ); - } diff --git a/includes/title/TitleFormatter.php b/includes/title/TitleFormatter.php index 263f5479df..ea58b1e329 100644 --- a/includes/title/TitleFormatter.php +++ b/includes/title/TitleFormatter.php @@ -31,7 +31,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ interface TitleFormatter { - /** * Returns the title formatted for display. * Per default, this includes the namespace but not the fragment. diff --git a/includes/title/TitleParser.php b/includes/title/TitleParser.php index b3ef479f9d..d5486639fc 100644 --- a/includes/title/TitleParser.php +++ b/includes/title/TitleParser.php @@ -31,7 +31,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ interface TitleParser { - /** * Parses the given text and constructs a TitleValue. Normalization * is applied according to the rules appropriate for the form specified by $form. diff --git a/includes/title/TitleValue.php b/includes/title/TitleValue.php index d2b4d86682..73e1dc2063 100644 --- a/includes/title/TitleValue.php +++ b/includes/title/TitleValue.php @@ -34,7 +34,6 @@ * @see https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue */ class TitleValue { - /** * @var int */ @@ -153,7 +152,7 @@ class TitleValue { public function __toString() { $name = $this->namespace . ':' . $this->dbkey; - if ( $this->fragment !== '' ) { + if ( $this->fragment !== '' ) { $name .= '#' . $this->fragment; } -- 2.20.1