Add missing @return to function docs
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 23 Aug 2014 20:34:25 +0000 (22:34 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 23 Aug 2014 21:14:57 +0000 (23:14 +0200)
Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9

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

index 70eb909..9a4567d 100644 (file)
@@ -3100,6 +3100,7 @@ HTML
         * Get the copyright warning
         *
         * Renamed to getCopyrightWarning(), old name kept around for backwards compatibility
+        * @return string
         */
        protected function getCopywarn() {
                return self::getCopyrightWarning( $this->mTitle );
index 9e7f5c4..48dbdba 100644 (file)
@@ -673,6 +673,7 @@ class Html {
         * @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 @@ class Html {
         * @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 @@ class Html {
         * @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(
index 7decbee..4d17298 100644 (file)
@@ -754,6 +754,7 @@ class MagicWordArray {
 
        /**
         * Get a 2-d hashtable for this array
+        * @return array
         */
        function getHash() {
                if ( is_null( $this->hash ) ) {
@@ -775,6 +776,7 @@ class MagicWordArray {
 
        /**
         * Get the base regex
+        * @return array
         */
        function getBaseRegex() {
                if ( is_null( $this->baseRegex ) ) {
@@ -799,6 +801,7 @@ class MagicWordArray {
 
        /**
         * Get an unanchored regex that does not match parameters
+        * @return array
         */
        function getRegex() {
                if ( is_null( $this->regex ) ) {
index b173ae9..2cdbe15 100644 (file)
@@ -328,6 +328,7 @@ class Sanitizer {
         * 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 ) {
index 93d6c0b..d9a1e80 100644 (file)
@@ -164,6 +164,7 @@ class WatchedItem {
        /**
         * Check permissions
         * @param string $what 'viewmywatchlist' or 'editmywatchlist'
+        * @return bool
         */
        private function isAllowed( $what ) {
                return !$this->mCheckRights || $this->mUser->isAllowed( $what );
index 2e3fc11..0e3b612 100644 (file)
@@ -247,6 +247,7 @@ See the <a href='https://www.mediawiki.org/wiki/API'>complete documentation</a>,
 
        /**
         * Get the contents of the buffer.
+        * @return string
         */
        public function getBuffer() {
                return $this->mBuffer;
index d09470b..06fdf85 100644 (file)
@@ -473,6 +473,7 @@ class ApiParse extends ApiBase {
        /**
         * @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)
index e2e304a..b8be6e4 100644 (file)
@@ -686,6 +686,7 @@ class LocalisationCache {
         *
         * @param string $code
         * @param array $deps
+        * @return array
         */
        protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
                global $IP;
index fb491e5..2d3b919 100644 (file)
@@ -180,6 +180,7 @@ class ChangesFeed {
        /**
         * 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__ );
index 65ae444..42c94f0 100644 (file)
@@ -4201,6 +4201,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType {
 
        /**
         * @since 1.19
+        * @return string
         */
        public function __toString() {
                return (string)$this->mConn;
index b8d5d79..2ce6307 100644 (file)
@@ -292,6 +292,7 @@ class DatabaseMysqli extends DatabaseMysqlBase {
         * 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 ) {
index 45fb3f6..44ca9de 100644 (file)
@@ -117,6 +117,7 @@ SQL;
 
        /**
         * @since 1.19
+        * @return bool|mixed
         */
        function defaultValue() {
                if ( $this->has_default ) {
index 1466605..5d084af 100644 (file)
@@ -116,6 +116,7 @@ class SearchUpdate implements DeferrableUpdate {
         * 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;
index 8c0c781..fab4216 100644 (file)
@@ -406,6 +406,7 @@ class RepoGroup {
        /**
         * Create a repo class based on an info structure
         * @param array $info
+        * @return FileRepo
         */
        protected function newRepo( $info ) {
                $class = $info['class'];
index a71acde..8bf9040 100644 (file)
@@ -407,6 +407,7 @@ class ArchivedFile {
        /**
         * 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 ) ) {
index f612aa3..4fab33b 100644 (file)
@@ -1331,6 +1331,7 @@ abstract class File {
        /**
         * Get last thumbnailing error.
         * Largely obsolete.
+        * @return string
         */
        function getLastError() {
                return $this->lastError;
index b61a352..b0a593d 100644 (file)
@@ -87,6 +87,7 @@ abstract class ImageGalleryBase extends ContextSource {
         *
         * @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 ) {
index 207efa8..52a49dd 100644 (file)
@@ -95,6 +95,7 @@ class PackedImageGallery extends TraditionalImageGallery {
        /**
         * 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' );
index 427ded4..b501428 100644 (file)
@@ -984,6 +984,7 @@ abstract class DatabaseUpdater {
 
        /**
         * Updates the timestamps in the transcache table
+        * @return bool
         */
        protected function doUpdateTranscacheField() {
                if ( $this->updateRowExists( 'convert transcache field' ) ) {
index 57fdab3..33b091b 100644 (file)
@@ -736,6 +736,7 @@ abstract class Installer {
        /**
         * Environment check for register_globals.
         * Prevent installation if enabled
+        * @return bool
         */
        protected function envCheckRegisterGlobals() {
                if ( wfIniGetBool( 'register_globals' ) ) {
index be7931d..ce5b972 100644 (file)
@@ -184,6 +184,7 @@ class LogPage {
 
        /**
         * Get the comment from the last addEntry() call
+        * @return string
         */
        public function getComment() {
                return $this->comment;
index 818bb25..018b58c 100644 (file)
@@ -563,6 +563,7 @@ class Exif {
 
        /**
         * Get $this->mFilteredExifData
+        * @return array
         */
        function getFilteredData() {
                return $this->mFilteredExifData;
index 984b01d..8970539 100644 (file)
@@ -1976,6 +1976,7 @@ class Article implements Page {
         * raw WikiPage fields for backwards compatibility.
         *
         * @param string $fname Field name
+        * @return mixed
         */
        public function __get( $fname ) {
                if ( property_exists( $this->mPage, $fname ) ) {
index 75fc01f..7fa4436 100644 (file)
@@ -809,6 +809,7 @@ class ParserOutput extends CacheTime {
 
        /**
         * Save space for for serialization by removing useless values
+        * @return array
         */
        public function __sleep() {
                return array_diff(
index 7e5f685..0bd6ca8 100644 (file)
@@ -483,6 +483,7 @@ class SearchHighlighter {
         * the target is category or image, leave it
         *
         * @param array $matches
+        * @return string
         */
        function linkReplace( $matches ) {
                $colon = strpos( $matches[1], ':' );
index c1dc158..2667270 100644 (file)
@@ -51,6 +51,7 @@ class ListDuplicatedFilesPage extends QueryPage {
         * 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(
index ed7648d..b5c763f 100644 (file)
@@ -301,6 +301,7 @@ class ImageListPager extends TablePager {
         * @param int $offset
         * @param int $limit
         * @param bool $asc
+        * @return array
         */
        function reallyDoQuery( $offset, $limit, $asc ) {
                $prevTableName = $this->mTableName;
index 3f1850d..3215778 100644 (file)
@@ -99,6 +99,7 @@ class MIMEsearchPage extends QueryPage {
         * 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();
index 6e04762..5c8794a 100644 (file)
@@ -97,6 +97,7 @@ class SpecialPageLanguage extends FormSpecialPage {
        /**
         *
         * @param array $data
+        * @return bool
         */
        public function onSubmit( array $data ) {
                $title = Title::newFromText( $data['pagename'] );
index 6c5401a..4add742 100644 (file)
@@ -77,6 +77,7 @@ class SpecialResetTokens extends FormSpecialPage {
        /**
         * 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();
index b97e2ad..3ceb620 100644 (file)
@@ -148,6 +148,7 @@ abstract class CdbWriter {
 
        /**
         * Are we running on Windows?
+        * @return bool
         */
        protected function isWindows() {
                return substr( php_uname(), 0, 7 ) == 'Windows';
index 31a71c4..b602f78 100644 (file)
@@ -61,6 +61,7 @@ class MWCryptRand {
 
        /**
         * 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