Update formatting of includes/title/
authorSiebrand Mazeland <siebrand@kitano.nl>
Mon, 21 Apr 2014 09:31:49 +0000 (11:31 +0200)
committerSiebrand <siebrand@kitano.nl>
Mon, 21 Apr 2014 09:32:30 +0000 (09:32 +0000)
Change-Id: I862dde47b569ca99f098d795e13b1999a33d790b

includes/title/MalformedTitleException.php
includes/title/MediaWikiPageLinkRenderer.php
includes/title/MediaWikiTitleCodec.php
includes/title/PageLinkRenderer.php
includes/title/TitleFormatter.php
includes/title/TitleParser.php
includes/title/TitleValue.php

index 4b14a19..a8a5d75 100644 (file)
@@ -29,5 +29,4 @@
  * @author Daniel Kinzler
  */
 class MalformedTitleException extends Exception {
-
 }
index 62ed4c2..c593dca 100644 (file)
@@ -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;
        }
 
index 288c1d9..9c89691 100644 (file)
@@ -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;
        }
-
 }
index 240a961..a277594 100644 (file)
@@ -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 );
-
 }
index 263f547..ea58b1e 100644 (file)
@@ -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.
index b3ef479..d548663 100644 (file)
@@ -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.
index d2b4d86..73e1dc2 100644 (file)
@@ -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;
                }