Merge "Special:RC filter: userExpLevel"
[lhc/web/wiklou.git] / includes / Title.php
index 3c51bae..c4584bd 100644 (file)
@@ -835,7 +835,7 @@ class Title implements LinkTarget {
        /**
         * Returns the DB name of the distant wiki which owns the object.
         *
-        * @return string The DB name
+        * @return string|false The DB name
         */
        public function getTransWikiID() {
                if ( !$this->isExternal() ) {
@@ -974,7 +974,7 @@ class Title implements LinkTarget {
        /**
         * Get the namespace text
         *
-        * @return string Namespace text
+        * @return string|false Namespace text
         */
        public function getNsText() {
                if ( $this->isExternal() ) {
@@ -1627,7 +1627,7 @@ class Title implements LinkTarget {
         *
         * @since 1.19 (r105919)
         * @param array|string $query
-        * @param bool $query2
+        * @param string|string[]|bool $query2
         * @return string
         */
        private static function fixUrlQueryArgs( $query, $query2 = false ) {
@@ -1663,8 +1663,8 @@ class Title implements LinkTarget {
         *
         * @see self::getLocalURL for the arguments.
         * @see wfExpandUrl
-        * @param array|string $query
-        * @param bool $query2
+        * @param string|string[] $query
+        * @param string|string[]|bool $query2
         * @param string $proto Protocol type to use in URL
         * @return string The URL
         */
@@ -1696,11 +1696,11 @@ class Title implements LinkTarget {
         *  valid to link, locally, to the current Title.
         * @see self::newFromText to produce a Title object.
         *
-        * @param string|array $query An optional query string,
+        * @param string|string[] $query An optional query string,
         *   not used for interwiki links. Can be specified as an associative array as well,
         *   e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
         *   Some query patterns will trigger various shorturl path replacements.
-        * @param array $query2 An optional secondary query array. This one MUST
+        * @param string|string[]|bool $query2 An optional secondary query array. This one MUST
         *   be an array. If a string is passed it will be interpreted as a deprecated
         *   variant argument and urlencoded into a variant= argument.
         *   This second query argument will be added to the $query
@@ -1795,7 +1795,7 @@ class Title implements LinkTarget {
         * The result obviously should not be URL-escaped, but does need to be
         * HTML-escaped if it's being output in HTML.
         *
-        * @param array $query
+        * @param string|string[] $query
         * @param bool $query2
         * @param string|int|bool $proto A PROTO_* constant on how the URL should be expanded,
         *                               or false (default) for no expansion
@@ -3703,23 +3703,28 @@ class Title implements LinkTarget {
         * @param bool $createRedirect Whether to create redirects from the old subpages to
         *     the new ones Ignored if the user doesn't have the 'suppressredirect' right
         * @return array Array with old page titles as keys, and strings (new page titles) or
-        *     arrays (errors) as values, or an error array with numeric indices if no pages
-        *     were moved
+        *     getUserPermissionsErrors()-like arrays (errors) as values, or a
+        *     getUserPermissionsErrors()-like error array with numeric indices if
+        *     no pages were moved
         */
        public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true ) {
                global $wgMaximumMovedPages;
                // Check permissions
                if ( !$this->userCan( 'move-subpages' ) ) {
-                       return [ 'cant-move-subpages' ];
+                       return [
+                               [ 'cant-move-subpages' ],
+                       ];
                }
                // Do the source and target namespaces support subpages?
                if ( !MWNamespace::hasSubpages( $this->getNamespace() ) ) {
-                       return [ 'namespace-nosubpages',
-                               MWNamespace::getCanonicalName( $this->getNamespace() ) ];
+                       return [
+                               [ 'namespace-nosubpages', MWNamespace::getCanonicalName( $this->getNamespace() ) ],
+                       ];
                }
                if ( !MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
-                       return [ 'namespace-nosubpages',
-                               MWNamespace::getCanonicalName( $nt->getNamespace() ) ];
+                       return [
+                               [ 'namespace-nosubpages', MWNamespace::getCanonicalName( $nt->getNamespace() ) ],
+                       ];
                }
 
                $subpages = $this->getSubpages( $wgMaximumMovedPages + 1 );
@@ -3728,9 +3733,9 @@ class Title implements LinkTarget {
                foreach ( $subpages as $oldSubpage ) {
                        $count++;
                        if ( $count > $wgMaximumMovedPages ) {
-                               $retval[$oldSubpage->getPrefixedText()] =
-                                               [ 'movepage-max-pages',
-                                                       $wgMaximumMovedPages ];
+                               $retval[$oldSubpage->getPrefixedText()] = [
+                                       [ 'movepage-max-pages', $wgMaximumMovedPages ],
+                               ];
                                break;
                        }
 
@@ -4436,7 +4441,7 @@ class Title implements LinkTarget {
         * Get the last touched timestamp
         *
         * @param IDatabase $db Optional db
-        * @return string Last-touched timestamp
+        * @return string|false Last-touched timestamp
         */
        public function getTouched( $db = null ) {
                if ( $db === null ) {