Add missing @param to function docs
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 14 Aug 2014 18:22:52 +0000 (20:22 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 14 Aug 2014 18:22:52 +0000 (20:22 +0200)
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a

30 files changed:
includes/Category.php
includes/Feed.php
includes/ForkController.php
includes/FormOptions.php
includes/Linker.php
includes/OutputPage.php
includes/actions/HistoryAction.php
includes/api/ApiUpload.php
includes/content/JSONContentHandler.php
includes/db/DatabaseMssql.php
includes/db/DatabasePostgres.php
includes/deferred/SearchUpdate.php
includes/diff/DifferenceEngine.php
includes/exception/MWException.php
includes/filebackend/FileBackend.php
includes/filerepo/FileRepo.php
includes/filerepo/RepoGroup.php
includes/filerepo/file/File.php
includes/filerepo/file/LocalFile.php
includes/gallery/ImageGalleryBase.php
includes/gallery/PackedImageGallery.php
includes/htmlform/HTMLEditTools.php
includes/htmlform/HTMLHiddenField.php
includes/htmlform/HTMLInfoField.php
includes/objectcache/RedisBagOStuff.php
includes/objectcache/SqlBagOStuff.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/profiler/ProfilerStandard.php
includes/specials/SpecialSearch.php

index 7bab464..322b053 100644 (file)
@@ -291,6 +291,7 @@ class Category {
 
        /**
         * Generic accessor
+        * @param string $key
         * @return bool
         */
        private function getX( $key ) {
index 58f3ebd..60e623b 100644 (file)
@@ -348,6 +348,7 @@ class RSSFeed extends ChannelFeed {
 class AtomFeed extends ChannelFeed {
        /**
         * @todo document
+        * @param string|int $ts
         * @return string
         */
        function formatTime( $ts ) {
index 0582230..c1765e2 100644 (file)
@@ -160,6 +160,7 @@ class ForkController {
        /**
         * Fork a number of worker processes.
         *
+        * @param int $numProcs
         * @return string
         */
        protected function forkWorkers( $numProcs ) {
index 079267a..c91c336 100644 (file)
@@ -375,6 +375,7 @@ class FormOptions implements ArrayAccess {
        /* @{ */
        /**
         * Whether the option exists.
+        * @param string $name
         * @return bool
         */
        public function offsetExists( $name ) {
@@ -383,6 +384,7 @@ class FormOptions implements ArrayAccess {
 
        /**
         * Retrieve an option value.
+        * @param string $name
         * @return mixed
         */
        public function offsetGet( $name ) {
@@ -391,6 +393,8 @@ class FormOptions implements ArrayAccess {
 
        /**
         * Set an option to given value.
+        * @param string $name
+        * @param mixed $value
         */
        public function offsetSet( $name, $value ) {
                $this->setValue( $name, $value );
@@ -398,6 +402,7 @@ class FormOptions implements ArrayAccess {
 
        /**
         * Delete the option.
+        * @param string $name
         */
        public function offsetUnset( $name ) {
                $this->delete( $name );
index 9f578a9..abc9404 100644 (file)
@@ -702,6 +702,7 @@ class Linker {
         * frame parameters supplied by the Parser.
         * @param array $frameParams The frame parameters
         * @param string $query An optional query string to add to description page links
+        * @param Parser|null $parser
         * @return array
         */
        private static function getImageLinkMTOParams( $frameParams, $query = '', $parser = null ) {
index cb25036..6ea4953 100644 (file)
@@ -311,6 +311,7 @@ class OutputPage extends ContextSource {
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will implicitly create
         * a OutputPage tied to that context.
+        * @param IContextSource|null $context
         */
        function __construct( IContextSource $context = null ) {
                if ( $context === null ) {
@@ -388,6 +389,7 @@ class OutputPage extends ContextSource {
        /**
         * Set the URL to be used for the <link rel=canonical>. This should be used
         * in preference to addLink(), to avoid duplicate link tags.
+        * @param string $url
         */
        function setCanonicalUrl( $url ) {
                $this->mCanonicalUrl = $url;
index 63ba683..7ca8f3a 100644 (file)
@@ -874,6 +874,7 @@ class HistoryPager extends ReverseChronologicalPager {
 
        /**
         * This is called if a write operation is possible from the generated HTML
+        * @param bool $enable
         */
        function preventClickjacking( $enable = true ) {
                $this->preventClickjacking = $enable;
index 0222e67..31816d6 100644 (file)
@@ -466,6 +466,7 @@ class ApiUpload extends ApiBase {
 
        /**
         * Performs file verification, dies on error.
+        * @param array $verification
         */
        protected function checkVerification( array $verification ) {
                // @todo Move them to ApiBase's message map
index 9d001da..6b77527 100644 (file)
@@ -46,12 +46,30 @@ class JSONContentHandler extends TextContentHandler {
                return new $this->contentClass( '' );
        }
 
-       /** JSON is English **/
+       /**
+        * Returns the english language, because JSON is english, and should be handled as such.
+        *
+        * @param Title $title
+        * @param Content|null $content
+        *
+        * @return Language Return of wfGetLangObj( 'en' )
+        *
+        * @see ContentHandler::getPageLanguage()
+        */
        public function getPageLanguage( Title $title, Content $content = null ) {
                return wfGetLangObj( 'en' );
        }
 
-       /** JSON is English **/
+       /**
+        * Returns the english language, because JSON is english, and should be handled as such.
+        *
+        * @param Title $title
+        * @param Content|null $content
+        *
+        * @return Language Return of wfGetLangObj( 'en' )
+        *
+        * @see ContentHandler::getPageLanguage()
+        */
        public function getPageViewLanguage( Title $title, Content $content = null ) {
                return wfGetLangObj( 'en' );
        }
index c2f5b6d..3a4bb27 100644 (file)
@@ -340,6 +340,7 @@ class DatabaseMssql extends DatabaseBase {
        }
 
        /**
+        * @param array $err
         * @return string
         */
        private function formatError( $err ) {
@@ -1068,6 +1069,7 @@ class DatabaseMssql extends DatabaseBase {
 
        /**
         * Begin a transaction, committing any previously open transaction
+        * @param string $fname
         */
        protected function doBegin( $fname = __METHOD__ ) {
                sqlsrv_begin_transaction( $this->mConn );
@@ -1076,6 +1078,7 @@ class DatabaseMssql extends DatabaseBase {
 
        /**
         * End a transaction
+        * @param string $fname
         */
        protected function doCommit( $fname = __METHOD__ ) {
                sqlsrv_commit( $this->mConn );
@@ -1085,6 +1088,7 @@ class DatabaseMssql extends DatabaseBase {
        /**
         * Rollback a transaction.
         * No-op on non-transactional databases.
+        * @param string $fname
         */
        protected function doRollback( $fname = __METHOD__ ) {
                sqlsrv_rollback( $this->mConn );
index 8642d1b..45fb3f6 100644 (file)
@@ -1201,6 +1201,9 @@ __INDEXATTR__;
 
        /**
         * Return aggregated value function call
+        * @param array $valuedata
+        * @param string $valuename
+        * @return array
         */
        public function aggregateValue( $valuedata, $valuename = 'value' ) {
                return $valuedata;
index 20f348a..1466605 100644 (file)
@@ -115,6 +115,7 @@ class SearchUpdate implements DeferrableUpdate {
         * Clean text for indexing. Only really suitable for indexing in databases.
         * 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
         */
        public static function updateText( $text ) {
                global $wgContLang;
@@ -179,6 +180,7 @@ class SearchUpdate implements DeferrableUpdate {
         * Get a string representation of a title suitable for
         * including in a search index
         *
+        * @param SearchEngine $search
         * @return string A stripped-down title string ready for the search index
         */
        private function indexTitle( SearchEngine $search ) {
index 661330d..ee918f3 100644 (file)
@@ -1140,6 +1140,8 @@ class DifferenceEngine extends ContextSource {
 
        /**
         * Use specified text instead of loading from the database
+        * @param Content $oldContent
+        * @param Content $newContent
         * @since 1.21
         */
        public function setContent( Content $oldContent, Content $newContent ) {
@@ -1153,6 +1155,7 @@ class DifferenceEngine extends ContextSource {
        /**
         * Set the language in which the diff text is written
         * (Defaults to page content language).
+        * @param Language|string $lang
         * @since 1.19
         */
        public function setTextLanguage( $lang ) {
index 58b07f5..074128f 100644 (file)
@@ -252,6 +252,7 @@ class MWException extends Exception {
        /**
         * Send a header, if we haven't already sent them. We shouldn't,
         * but sometimes we might in a weird case like Export
+        * @param string $header
         */
        private static function header( $header ) {
                if ( !headers_sent() ) {
index 2820be2..78810eb 100644 (file)
@@ -218,7 +218,7 @@ abstract class FileBackend {
        /**
         * Check if the backend medium supports a field of extra features
         *
-        * @return int Bitfield of FileBackend::ATTR_* flags
+        * @param int $bitfield Bitfield of FileBackend::ATTR_* flags
         * @return bool
         * @since 1.23
         */
index 3bff91f..25a06d2 100644 (file)
@@ -1448,6 +1448,7 @@ class FileRepo {
         * Delete files in the deleted directory if they are not referenced in the filearchive table
         *
         * STUB
+        * @param array $storageKeys
         */
        public function cleanupDeletedBatch( array $storageKeys ) {
                $this->assertWritableRepo();
index 189c3a3..0f80e16 100644 (file)
@@ -409,6 +409,7 @@ class RepoGroup {
 
        /**
         * Create a repo class based on an info structure
+        * @param array $info
         */
        protected function newRepo( $info ) {
                $class = $info['class'];
index 4e11c81..0c4e42e 100644 (file)
@@ -1287,6 +1287,7 @@ abstract class File {
         * Hook into transform() to allow migration of thumbnail files
         * STUB
         * Overridden by LocalFile
+        * @param string $thumbName
         */
        function migrateThumbFile( $thumbName ) {
        }
index 3ba47ff..07f1f09 100644 (file)
@@ -379,6 +379,7 @@ class LocalFile extends File {
 
        /**
         * Load file metadata from the DB
+        * @param int $flags
         */
        function loadFromDB( $flags = 0 ) {
                # Polymorphic function name to distinguish foreign and local fetches
@@ -931,6 +932,7 @@ class LocalFile extends File {
 
        /**
         * Delete cached transformed files for the current version only.
+        * @param array $options
         */
        function purgeThumbnails( $options = array() ) {
                global $wgUseSquid;
@@ -2371,6 +2373,7 @@ class LocalFileRestoreBatch {
 
        /**
         * Add a file by ID
+        * @param int $fa_id
         */
        function addId( $fa_id ) {
                $this->ids[] = $fa_id;
@@ -2378,6 +2381,7 @@ class LocalFileRestoreBatch {
 
        /**
         * Add a whole lot of files by ID
+        * @param int[] $ids
         */
        function addIds( $ids ) {
                $this->ids = array_merge( $this->ids, $ids );
@@ -2973,6 +2977,7 @@ class LocalFileMoveBatch {
        /**
         * Cleanup a partially moved array of triplets by deleting the target
         * files. Called if something went wrong half way.
+        * @param array $triplets
         */
        function cleanupTarget( $triplets ) {
                // Create dest pairs from the triplets
@@ -2988,6 +2993,7 @@ class LocalFileMoveBatch {
        /**
         * Cleanup a fully moved array of triplets by deleting the source files.
         * Called at the end of the move process if everything else went ok.
+        * @param array $triplets
         */
        function cleanupSource( $triplets ) {
                // Create source file names from the triplets
index 53c2e10..2d3ea5a 100644 (file)
@@ -123,6 +123,7 @@ abstract class ImageGalleryBase extends ContextSource {
         *
         * You should not call this directly, but instead use
         * ImageGalleryBase::factory().
+        * @param string $mode
         */
        function __construct( $mode = 'traditional' ) {
                global $wgGalleryOptions;
@@ -154,6 +155,7 @@ abstract class ImageGalleryBase extends ContextSource {
 
        /**
         * Set bad image flag
+        * @param bool $flag
         */
        function setHideBadImages( $flag = true ) {
                $this->mHideBadImages = $flag;
index b004a95..207efa8 100644 (file)
@@ -103,6 +103,7 @@ class PackedImageGallery extends TraditionalImageGallery {
        /**
         * Do not support per-row on packed. It really doesn't work
         * since the images have varying widths.
+        * @param int $num
         */
        public function setPerRow( $num ) {
                return;
index 4f1b530..77924ef 100644 (file)
@@ -16,6 +16,8 @@ class HTMLEditTools extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getDiv( $value ) {
@@ -25,6 +27,8 @@ class HTMLEditTools extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getRaw( $value ) {
index 6ea95ed..e32c0bb 100644 (file)
@@ -21,6 +21,8 @@ class HTMLHiddenField extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getDiv( $value ) {
@@ -28,6 +30,8 @@ class HTMLHiddenField extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getRaw( $value ) {
index cff8202..a422047 100644 (file)
@@ -23,6 +23,8 @@ class HTMLInfoField extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getDiv( $value ) {
@@ -34,6 +36,8 @@ class HTMLInfoField extends HTMLFormField {
        }
 
        /**
+        * @param string $value
+        * @return string
         * @since 1.20
         */
        public function getRaw( $value ) {
index c7d2f13..ae8cc5b 100644 (file)
@@ -342,6 +342,7 @@ class RedisBagOStuff extends BagOStuff {
 
        /**
         * Get a Redis object with a connection suitable for fetching the specified key
+        * @param string $key
         * @return array (server, RedisConnRef) or (false, false)
         */
        protected function getConnection( $key ) {
index da3eda1..5872079 100644 (file)
@@ -521,6 +521,7 @@ class SqlBagOStuff extends BagOStuff {
        }
 
        /**
+        * @param DatabaseBase $db
         * @param string $exptime
         * @return bool
         */
index 64febcc..2ca9d50 100644 (file)
@@ -517,6 +517,7 @@ class ParserOptions {
 
        /**
         * Extra key that should be present in the parser cache key.
+        * @param string $key
         */
        public function addExtraKey( $key ) {
                $this->mExtraKey .= '!' . $key;
index 95c0a16..75fc01f 100644 (file)
@@ -502,6 +502,7 @@ class ParserOutput extends CacheTime {
 
        /**
         * Fairly generic flag setter thingy.
+        * @param string $flag
         */
        public function setFlag( $flag ) {
                $this->mFlags[$flag] = true;
index 7fd86eb..cc13416 100644 (file)
@@ -339,6 +339,7 @@ class ProfilerStandard extends Profiler {
 
        /**
         * Callback to get a formatted line for the call tree
+        * @param array $entry
         * @return string
         */
        protected function getCallTreeLine( $entry ) {
@@ -514,6 +515,7 @@ class ProfilerStandard extends Profiler {
 
        /**
         * Dummy calls to wfProfileIn/wfProfileOut to calculate its overhead
+        * @param int $profileCount
         */
        protected static function calculateOverhead( $profileCount ) {
                wfProfileIn( '-overhead-total' );
index 5f16239..6419a57 100644 (file)
@@ -1068,6 +1068,8 @@ class SpecialSearch extends SpecialPage {
 
        /**
         * @param string $term
+        * @param int $resultsShown
+        * @param int $totalNum
         * @return string
         */
        protected function shortDialog( $term, $resultsShown, $totalNum ) {