Umherirrender has uploaded a new change for review.

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

Change subject: Add missing @return to function docs
......................................................................

Add missing @return to function docs

Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
---
M includes/EditPage.php
M includes/Html.php
M includes/MagicWord.php
M includes/Sanitizer.php
M includes/WatchedItem.php
M includes/api/ApiFormatBase.php
M includes/api/ApiParse.php
M includes/cache/LocalisationCache.php
M includes/changes/ChangesFeed.php
M includes/db/Database.php
M includes/db/DatabaseMysqli.php
M includes/db/DatabasePostgres.php
M includes/deferred/SearchUpdate.php
M includes/filerepo/RepoGroup.php
M includes/filerepo/file/ArchivedFile.php
M includes/filerepo/file/File.php
M includes/gallery/ImageGalleryBase.php
M includes/gallery/PackedImageGallery.php
M includes/installer/DatabaseUpdater.php
M includes/installer/Installer.php
M includes/logging/LogPage.php
M includes/media/Exif.php
M includes/page/Article.php
M includes/parser/ParserOutput.php
M includes/search/SearchHighlighter.php
M includes/specials/SpecialListDuplicatedFiles.php
M includes/specials/SpecialListfiles.php
M includes/specials/SpecialMIMEsearch.php
M includes/specials/SpecialPageLanguage.php
M includes/specials/SpecialResetTokens.php
M includes/utils/Cdb.php
M includes/utils/MWCryptRand.php
32 files changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/156003/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 70eb909..9a4567d 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3100,6 +3100,7 @@
         * Get the copyright warning
         *
         * Renamed to getCopyrightWarning(), old name kept around for backwards 
compatibility
+        * @return string
         */
        protected function getCopywarn() {
                return self::getCopyrightWarning( $this->mTitle );
diff --git a/includes/Html.php b/includes/Html.php
index 9e7f5c4..48dbdba 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -673,6 +673,7 @@
         * @param string $name Name attribute
         * @param bool $checked Whether the checkbox is checked or not
         * @param array $attribs Array of additional attributes
+        * @return string
         */
        public static function check( $name, $checked = false, array $attribs = 
array() ) {
                if ( isset( $attribs['value'] ) ) {
@@ -695,6 +696,7 @@
         * @param string $name Name attribute
         * @param bool $checked Whether the checkbox is checked or not
         * @param array $attribs Array of additional attributes
+        * @return string
         */
        public static function radio( $name, $checked = false, array $attribs = 
array() ) {
                if ( isset( $attribs['value'] ) ) {
@@ -717,6 +719,7 @@
         * @param string $label Contents of the label
         * @param string $id ID of the element being labeled
         * @param array $attribs Additional attributes
+        * @return string
         */
        public static function label( $label, $id, array $attribs = array() ) {
                $attribs += array(
diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 7decbee..4d17298 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -754,6 +754,7 @@
 
        /**
         * Get a 2-d hashtable for this array
+        * @return array
         */
        function getHash() {
                if ( is_null( $this->hash ) ) {
@@ -775,6 +776,7 @@
 
        /**
         * Get the base regex
+        * @return array
         */
        function getBaseRegex() {
                if ( is_null( $this->baseRegex ) ) {
@@ -799,6 +801,7 @@
 
        /**
         * Get an unanchored regex that does not match parameters
+        * @return array
         */
        function getRegex() {
                if ( is_null( $this->regex ) ) {
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index b173ae9..2cdbe15 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -328,6 +328,7 @@
         * Regular expression to match HTML/XML attribute pairs within a tag.
         * Allows some... latitude.
         * Used in Sanitizer::fixTagAttributes and 
Sanitizer::decodeTagAttributes
+        * @return string
         */
        static function getAttribsRegex() {
                if ( self::$attribsRegex === null ) {
diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php
index 93d6c0b..d9a1e80 100644
--- a/includes/WatchedItem.php
+++ b/includes/WatchedItem.php
@@ -164,6 +164,7 @@
        /**
         * Check permissions
         * @param string $what 'viewmywatchlist' or 'editmywatchlist'
+        * @return bool
         */
        private function isAllowed( $what ) {
                return !$this->mCheckRights || $this->mUser->isAllowed( $what );
diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 2e3fc11..2fba5e9 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -247,6 +247,7 @@
 
        /**
         * Get the contents of the buffer.
+        * @return bool
         */
        public function getBuffer() {
                return $this->mBuffer;
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index d09470b..06fdf85 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -473,6 +473,7 @@
        /**
         * @param Content $content
         * @param string $what Identifies the content in error messages, e.g. 
page title.
+        * @return Content|bool
         */
        private function getSectionContent( Content $content, $what ) {
                // Not cached (save or load)
diff --git a/includes/cache/LocalisationCache.php 
b/includes/cache/LocalisationCache.php
index e2e304a..b8be6e4 100644
--- a/includes/cache/LocalisationCache.php
+++ b/includes/cache/LocalisationCache.php
@@ -686,6 +686,7 @@
         *
         * @param string $code
         * @param array $deps
+        * @return array
         */
        protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
                global $IP;
diff --git a/includes/changes/ChangesFeed.php b/includes/changes/ChangesFeed.php
index fb491e5..2d3b919 100644
--- a/includes/changes/ChangesFeed.php
+++ b/includes/changes/ChangesFeed.php
@@ -180,6 +180,7 @@
        /**
         * Generate the feed items given a row from the database.
         * @param object $rows DatabaseBase resource with recentchanges rows
+        * @return array
         */
        public static function buildItems( $rows ) {
                wfProfileIn( __METHOD__ );
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 65ae444..42c94f0 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -4201,6 +4201,7 @@
 
        /**
         * @since 1.19
+        * @return string
         */
        public function __toString() {
                return (string)$this->mConn;
diff --git a/includes/db/DatabaseMysqli.php b/includes/db/DatabaseMysqli.php
index b8d5d79..2ce6307 100644
--- a/includes/db/DatabaseMysqli.php
+++ b/includes/db/DatabaseMysqli.php
@@ -292,6 +292,7 @@
         * Give an id for the connection
         *
         * mysql driver used resource id, but mysqli objects cannot be cast to 
string.
+        * @return string
         */
        public function __toString() {
                if ( $this->mConn instanceof Mysqli ) {
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 45fb3f6..44ca9de 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -117,6 +117,7 @@
 
        /**
         * @since 1.19
+        * @return bool|mixed
         */
        function defaultValue() {
                if ( $this->has_default ) {
diff --git a/includes/deferred/SearchUpdate.php 
b/includes/deferred/SearchUpdate.php
index 1466605..5d084af 100644
--- a/includes/deferred/SearchUpdate.php
+++ b/includes/deferred/SearchUpdate.php
@@ -116,6 +116,7 @@
         * If you're using a real search engine, you'll probably want to 
override
         * this behavior and do something nicer with the original wikitext.
         * @param string $text
+        * @return string
         */
        public static function updateText( $text ) {
                global $wgContLang;
diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php
index 8c0c781..fab4216 100644
--- a/includes/filerepo/RepoGroup.php
+++ b/includes/filerepo/RepoGroup.php
@@ -406,6 +406,7 @@
        /**
         * Create a repo class based on an info structure
         * @param array $info
+        * @return FileRepo
         */
        protected function newRepo( $info ) {
                $class = $info['class'];
diff --git a/includes/filerepo/file/ArchivedFile.php 
b/includes/filerepo/file/ArchivedFile.php
index a71acde..8bf9040 100644
--- a/includes/filerepo/file/ArchivedFile.php
+++ b/includes/filerepo/file/ArchivedFile.php
@@ -407,6 +407,7 @@
        /**
         * Returns the number of pages of a multipage document, or false for
         * documents which aren't multipage documents
+        * @return bool|int
         */
        function pageCount() {
                if ( !isset( $this->pageCount ) ) {
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index f612aa3..4fab33b 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1331,6 +1331,7 @@
        /**
         * Get last thumbnailing error.
         * Largely obsolete.
+        * @return string
         */
        function getLastError() {
                return $this->lastError;
diff --git a/includes/gallery/ImageGalleryBase.php 
b/includes/gallery/ImageGalleryBase.php
index b61a352..b0a593d 100644
--- a/includes/gallery/ImageGalleryBase.php
+++ b/includes/gallery/ImageGalleryBase.php
@@ -87,6 +87,7 @@
         *
         * @param string|bool $mode Mode to use. False to use the default
         * @param IContextSource|null $context
+        * @return ImageGalleryBase
         * @throws MWException
         */
        static function factory( $mode = false, IContextSource $context = null 
) {
diff --git a/includes/gallery/PackedImageGallery.php 
b/includes/gallery/PackedImageGallery.php
index 207efa8..52a49dd 100644
--- a/includes/gallery/PackedImageGallery.php
+++ b/includes/gallery/PackedImageGallery.php
@@ -95,6 +95,7 @@
        /**
         * Add javascript which auto-justifies the rows by manipulating the 
image sizes.
         * Also ensures that the hover version of this degrades gracefully.
+        * @return array
         */
        protected function getModules() {
                return array( 'mediawiki.page.gallery' );
diff --git a/includes/installer/DatabaseUpdater.php 
b/includes/installer/DatabaseUpdater.php
index 427ded4..b501428 100644
--- a/includes/installer/DatabaseUpdater.php
+++ b/includes/installer/DatabaseUpdater.php
@@ -984,6 +984,7 @@
 
        /**
         * Updates the timestamps in the transcache table
+        * @return bool
         */
        protected function doUpdateTranscacheField() {
                if ( $this->updateRowExists( 'convert transcache field' ) ) {
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 57fdab3..33b091b 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -736,6 +736,7 @@
        /**
         * Environment check for register_globals.
         * Prevent installation if enabled
+        * @return bool
         */
        protected function envCheckRegisterGlobals() {
                if ( wfIniGetBool( 'register_globals' ) ) {
diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php
index be7931d..ce5b972 100644
--- a/includes/logging/LogPage.php
+++ b/includes/logging/LogPage.php
@@ -184,6 +184,7 @@
 
        /**
         * Get the comment from the last addEntry() call
+        * @return string
         */
        public function getComment() {
                return $this->comment;
diff --git a/includes/media/Exif.php b/includes/media/Exif.php
index 818bb25..018b58c 100644
--- a/includes/media/Exif.php
+++ b/includes/media/Exif.php
@@ -563,6 +563,7 @@
 
        /**
         * Get $this->mFilteredExifData
+        * @return array
         */
        function getFilteredData() {
                return $this->mFilteredExifData;
diff --git a/includes/page/Article.php b/includes/page/Article.php
index 984b01d..8970539 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1976,6 +1976,7 @@
         * raw WikiPage fields for backwards compatibility.
         *
         * @param string $fname Field name
+        * @return mixed
         */
        public function __get( $fname ) {
                if ( property_exists( $this->mPage, $fname ) ) {
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index 75fc01f..7fa4436 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -809,6 +809,7 @@
 
        /**
         * Save space for for serialization by removing useless values
+        * @return array
         */
        public function __sleep() {
                return array_diff(
diff --git a/includes/search/SearchHighlighter.php 
b/includes/search/SearchHighlighter.php
index 7e5f685..0bd6ca8 100644
--- a/includes/search/SearchHighlighter.php
+++ b/includes/search/SearchHighlighter.php
@@ -483,6 +483,7 @@
         * the target is category or image, leave it
         *
         * @param array $matches
+        * @return string
         */
        function linkReplace( $matches ) {
                $colon = strpos( $matches[1], ':' );
diff --git a/includes/specials/SpecialListDuplicatedFiles.php 
b/includes/specials/SpecialListDuplicatedFiles.php
index c1dc158..2667270 100644
--- a/includes/specials/SpecialListDuplicatedFiles.php
+++ b/includes/specials/SpecialListDuplicatedFiles.php
@@ -51,6 +51,7 @@
         * However this version should be no more expensive then
         * Special:MostLinked, which seems to get handled fine
         * with however we are doing cached special pages.
+        * @return array
         */
        function getQueryInfo() {
                return array(
diff --git a/includes/specials/SpecialListfiles.php 
b/includes/specials/SpecialListfiles.php
index ed7648d..b5c763f 100644
--- a/includes/specials/SpecialListfiles.php
+++ b/includes/specials/SpecialListfiles.php
@@ -301,6 +301,7 @@
         * @param int $offset
         * @param int $limit
         * @param bool $asc
+        * @return array
         */
        function reallyDoQuery( $offset, $limit, $asc ) {
                $prevTableName = $this->mTableName;
diff --git a/includes/specials/SpecialMIMEsearch.php 
b/includes/specials/SpecialMIMEsearch.php
index 3f1850d..3215778 100644
--- a/includes/specials/SpecialMIMEsearch.php
+++ b/includes/specials/SpecialMIMEsearch.php
@@ -99,6 +99,7 @@
         * that this report gives results in a logical order). As an aditional
         * note, mysql seems to by default order things by img_name ASC, which
         * is what we ideally want, so everything works out fine anyhow.
+        * @return array
         */
        function getOrderFields() {
                return array();
diff --git a/includes/specials/SpecialPageLanguage.php 
b/includes/specials/SpecialPageLanguage.php
index 6e04762..5c8794a 100644
--- a/includes/specials/SpecialPageLanguage.php
+++ b/includes/specials/SpecialPageLanguage.php
@@ -97,6 +97,7 @@
        /**
         *
         * @param array $data
+        * @return bool
         */
        public function onSubmit( array $data ) {
                $title = Title::newFromText( $data['pagename'] );
diff --git a/includes/specials/SpecialResetTokens.php 
b/includes/specials/SpecialResetTokens.php
index 6c5401a..4add742 100644
--- a/includes/specials/SpecialResetTokens.php
+++ b/includes/specials/SpecialResetTokens.php
@@ -77,6 +77,7 @@
        /**
         * Display appropriate message if there's nothing to do.
         * The submit button is also suppressed in this case (see alterForm()).
+        * @return array
         */
        protected function getFormFields() {
                $user = $this->getUser();
diff --git a/includes/utils/Cdb.php b/includes/utils/Cdb.php
index b97e2ad..3ceb620 100644
--- a/includes/utils/Cdb.php
+++ b/includes/utils/Cdb.php
@@ -148,6 +148,7 @@
 
        /**
         * Are we running on Windows?
+        * @return bool
         */
        protected function isWindows() {
                return substr( php_uname(), 0, 7 ) == 'Windows';
diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index 31a71c4..b602f78 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -61,6 +61,7 @@
 
        /**
         * Initialize an initial random state based off of whatever we can find
+        * @return string
         */
        protected function initialRandomState() {
                // $_SERVER contains a variety of unstable user and system 
specific information

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to