Fix various mistakes in PHPDoc comments
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 9 Dec 2015 17:20:41 +0000 (18:20 +0100)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 9 Dec 2015 17:20:41 +0000 (18:20 +0100)
Change-Id: I434207f61e0663f2d2c9a076296c2e0d04a3fafb

includes/api/ApiFormatRaw.php
includes/db/DatabaseUtility.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/tidy/TidyDriverBase.php

index 9dbd4a5..b1a9c98 100644 (file)
@@ -36,7 +36,7 @@ class ApiFormatRaw extends ApiFormatBase {
 
        /**
         * @param ApiMain $main
-        * @param ApiFormatBase |null $errorFallback Object to fall back on for errors
+        * @param ApiFormatBase|null $errorFallback Object to fall back on for errors
         */
        public function __construct( ApiMain $main, ApiFormatBase $errorFallback = null ) {
                parent::__construct( $main, 'raw' );
index 969ed5e..2bd0770 100644 (file)
@@ -113,11 +113,11 @@ class ResultWrapper implements Iterator {
        }
 
        /**
-        * Fetch the next row from the given result object, in object form.
-        * Fields can be retrieved with $row->fieldname, with fields acting like
-        * member variables.
+        * Fetch the next row from the given result object, in object form. Fields can be retrieved with
+        * $row->fieldname, with fields acting like member variables. If no more rows are available,
+        * false is returned.
         *
-        * @return stdClass
+        * @return stdClass|bool
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
        function fetchObject() {
@@ -125,10 +125,10 @@ class ResultWrapper implements Iterator {
        }
 
        /**
-        * Fetch the next row from the given result object, in associative array
-        * form. Fields are retrieved with $row['fieldname'].
+        * Fetch the next row from the given result object, in associative array form. Fields are
+        * retrieved with $row['fieldname']. If no more rows are available, false is returned.
         *
-        * @return array
+        * @return array|bool
         * @throws DBUnexpectedError Thrown if the database returns an error
         */
        function fetchRow() {
index ef98400..dd7c5a3 100644 (file)
@@ -445,7 +445,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
 
        /**
         * Gets list of names of modules this module depends on.
-        * @param ResourceLoaderContext context
+        * @param ResourceLoaderContext|null $context
         * @return array List of module names
         */
        public function getDependencies( ResourceLoaderContext $context = null ) {
index 61fd3e4..06775ef 100644 (file)
@@ -33,8 +33,8 @@ abstract class TidyDriverBase {
        /**
         * Clean up HTML
         *
-        * @param string HTML document fragment to clean up
-        * @param string The corrected HTML output
+        * @param string $text HTML document fragment to clean up
+        * @return string The corrected HTML output
         */
        abstract public function tidy( $text );
 }