Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/124820

Change subject: Fix "@param null $param" documentations
......................................................................

Fix "@param null $param" documentations

... and very few other documentation details that are closely connected
to these mistakes.

Change-Id: I5b2691948e196124c77f0cc04d0ed5a7167cac25
---
M includes/filerepo/ForeignAPIRepo.php
M includes/installer/DatabaseUpdater.php
M includes/parser/CoreParserFunctions.php
M includes/parser/DateFormatter.php
M tests/phpunit/includes/RevisionTest.php
M tests/phpunit/includes/content/ContentHandlerTest.php
6 files changed, 24 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/124820/1

diff --git a/includes/filerepo/ForeignAPIRepo.php 
b/includes/filerepo/ForeignAPIRepo.php
index 4e48932..35ac60f 100644
--- a/includes/filerepo/ForeignAPIRepo.php
+++ b/includes/filerepo/ForeignAPIRepo.php
@@ -252,8 +252,9 @@
         * @param string $name
         * @param int $width
         * @param int $height
-        * @param null $result
+        * @param array $result Out parameter that will be changed by the 
function.
         * @param string $otherParams
+        *
         * @return bool
         */
        function getThumbUrl( $name, $width = -1, $height = -1, &$result = 
null, $otherParams = '' ) {
diff --git a/includes/installer/DatabaseUpdater.php 
b/includes/installer/DatabaseUpdater.php
index 3f2e2cb..5223cd3 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -155,10 +155,11 @@
        }
 
        /**
-        * @throws MWException
         * @param DatabaseBase $db
         * @param bool $shared
-        * @param null $maintenance
+        * @param Maintenance $maintenance
+        *
+        * @throws MWException
         * @return DatabaseUpdater
         */
        public static function newForDB( &$db, $shared = false, $maintenance = 
null ) {
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 8fa39fa..02f2438 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -91,10 +91,11 @@
        }
 
        /**
-        * @param $parser Parser
-        * @param $date
-        * @param null $defaultPref
-        * @return mixed|string
+        * @param Parser $parser
+        * @param string $date
+        * @param string $defaultPref
+        *
+        * @return string
         */
        static function formatDate( $parser, $date, $defaultPref = null ) {
                $lang = $parser->getFunctionLang();
diff --git a/includes/parser/DateFormatter.php 
b/includes/parser/DateFormatter.php
index 0a69b04..d10841f 100644
--- a/includes/parser/DateFormatter.php
+++ b/includes/parser/DateFormatter.php
@@ -143,7 +143,8 @@
         * @param string $preference User preference
         * @param string $text Text to reformat
         * @param array $options can contain 'linked' and/or 'match-whole'
-        * @return mixed|String
+        *
+        * @return string
         */
        function reformat( $preference, $text, $options = array( 'linked' ) ) {
                $linked = in_array( 'linked', $options );
diff --git a/tests/phpunit/includes/RevisionTest.php 
b/tests/phpunit/includes/RevisionTest.php
index fc23919..48a4017 100644
--- a/tests/phpunit/includes/RevisionTest.php
+++ b/tests/phpunit/includes/RevisionTest.php
@@ -179,7 +179,7 @@
         * @param string $text
         * @param string $title
         * @param string $model
-        * @param null $format
+        * @param string $format
         *
         * @return Revision
         */
diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php 
b/tests/phpunit/includes/content/ContentHandlerTest.php
index d1c214a..080ff54 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -315,22 +315,24 @@
        }
 
        /**
-        * Serializes Content object of the type supported by this 
ContentHandler.
+        * @see ContentHandler::serializeContent
         *
-        * @param Content $content the Content object to serialize
-        * @param null $format the desired serialization format
-        * @return String serialized form of the content
+        * @param Content $content
+        * @param string $format
+        *
+        * @return string
         */
        public function serializeContent( Content $content, $format = null ) {
                return $content->serialize();
        }
 
        /**
-        * Unserializes a Content object of the type supported by this 
ContentHandler.
+        * @see ContentHandler::unserializeContent
         *
-        * @param $blob String serialized form of the content
-        * @param null $format the format used for serialization
-        * @return Content the Content object created by deserializing $blob
+        * @param string $blob
+        * @param string $format Unused.
+        *
+        * @return Content
         */
        public function unserializeContent( $blob, $format = null ) {
                $d = unserialize( $blob );
@@ -437,7 +439,7 @@
 
        /**
         * @param Title $title
-        * @param null $revId
+        * @param int $revId Unused.
         * @param null|ParserOptions $options
         * @param boolean $generateHtml whether to generate Html (default: 
true). If false,
         *  the result of calling getText() on the ParserOutput object returned 
by

-- 
To view, visit https://gerrit.wikimedia.org/r/124820
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b2691948e196124c77f0cc04d0ed5a7167cac25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to