Added missing @since and @return tags so other people dont have to waste their time...
authorjeroendedauw <jeroendedauw@gmail.com>
Thu, 9 Aug 2012 12:29:46 +0000 (14:29 +0200)
committerjeroendedauw <jeroendedauw@gmail.com>
Thu, 9 Aug 2012 12:29:46 +0000 (14:29 +0200)
Change-Id: I84e75da7bdbf30b57368eca0051b1aa664afc798

includes/parser/Parser.php

index 66da408..b351290 100644 (file)
@@ -735,16 +735,22 @@ class Parser {
        /**
         * Get the target language for the content being parsed. This is usually the
         * language that the content is in.
+        *
+        * @since 1.19
+        *
+        * @return Language|null
         */
-       function getTargetLanguage() {
+       public function getTargetLanguage() {
                $target = $this->mOptions->getTargetLanguage();
+
                if ( $target !== null ) {
                        return $target;
                } elseif( $this->mOptions->getInterfaceMessage() ) {
                        return $this->mOptions->getUserLangObj();
                } elseif( is_null( $this->mTitle ) ) {
-                       throw new MWException( __METHOD__.': $this->mTitle is null' );
+                       throw new MWException( __METHOD__ . ': $this->mTitle is null' );
                }
+
                return $this->mTitle->getPageLanguage();
        }