update @param @return doc in several files
authorAntoine Musso <hashar@free.fr>
Tue, 10 Jul 2012 14:58:52 +0000 (16:58 +0200)
committerAntoine Musso <hashar@free.fr>
Tue, 10 Jul 2012 15:08:52 +0000 (17:08 +0200)
Change-Id: I0e23227330f90dc4121fd2a313d2e9a33c3c97a7

21 files changed:
includes/ChangesList.php
includes/EditPage.php
includes/Export.php
includes/Linker.php
includes/LinksUpdate.php
includes/OutputPage.php
includes/RecentChange.php
includes/StringUtils.php
includes/logging/LogEventsList.php
includes/logging/PatrolLog.php
includes/media/Generic.php
includes/objectcache/MemcachedBagOStuff.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
includes/parser/ParserCache.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialUploadStash.php
includes/specials/SpecialUserlogin.php
includes/upload/UploadBase.php
includes/upload/UploadStash.php

index b37612f..96a11e1 100644 (file)
@@ -564,7 +564,9 @@ class OldChangesList extends ChangesList {
        /**
         * Format a line using the old system (aka without any javascript).
         *
-        * @param $rc RecentChange
+        * @param $rc RecentChange, passed by reference
+        * @param $watched Bool (default false)
+        * @param $linenumber Int (default null)
         * @return string
         */
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
@@ -1104,7 +1106,7 @@ class EnhancedChangesList extends ChangesList {
         * @param $dir String: one of '', 'd', 'l', 'r'
         * @param $alt String: text
         * @param $title String: text
-        * @return String: HTML <img> tag
+        * @return String: HTML "<img>" tag
         */
        protected function arrow( $dir, $alt='', $title='' ) {
                global $wgStylePath;
@@ -1117,7 +1119,7 @@ class EnhancedChangesList extends ChangesList {
        /**
         * Generate HTML for a right- or left-facing arrow,
         * depending on language direction.
-        * @return String: HTML <img> tag
+        * @return String: HTML "<img>" tag
         */
        protected function sideArrow() {
                $dir = $this->getLanguage()->isRTL() ? 'l' : 'r';
@@ -1127,7 +1129,7 @@ class EnhancedChangesList extends ChangesList {
        /**
         * Generate HTML for a down-facing arrow
         * depending on language direction.
-        * @return String: HTML <img> tag
+        * @return String: HTML "<img>" tag
         */
        protected function downArrow() {
                return $this->arrow( 'd', '-', $this->msg( 'rc-enhanced-hide' )->text() );
@@ -1135,7 +1137,7 @@ class EnhancedChangesList extends ChangesList {
 
        /**
         * Generate HTML for a spacer image
-        * @return String: HTML <img> tag
+        * @return String: HTML "<img>" tag
         */
        protected function spacerArrow() {
                return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // non-breaking space
index 1376d57..5ce703e 100644 (file)
@@ -1515,7 +1515,7 @@ class EditPage {
         * @private
         * @todo document
         *
-        * @parma $editText string
+        * @param $editText string
         *
         * @return bool
         */
@@ -1582,7 +1582,7 @@ class EditPage {
        /**
         * Check given input text against $wgSpamRegex, and return the text of the first match.
         *
-        * @parma $text string
+        * @param $text string
         *
         * @return string|bool  matching string or false
         */
index 92cfa1e..2bef114 100644 (file)
@@ -726,6 +726,7 @@ class XmlDumpWriter {
 
        /**
         * @param $timestamp string
+        * @param $indent string Default to six spaces
         * @return string
         */
        function writeTimestamp( $timestamp, $indent = "      " ) {
@@ -736,6 +737,7 @@ class XmlDumpWriter {
        /**
         * @param $id
         * @param $text string
+        * @param $indent string Default to six spaces
         * @return string
         */
        function writeContributor( $id, $text, $indent = "      " ) {
index 526ad0c..87cdd3f 100644 (file)
@@ -407,6 +407,11 @@ class Linker {
         * despite $query not being used.
         *
         * @param $nt Title
+        * @param $html String [optional]
+        * @param $query String [optional]
+        * @param $trail String [optional]
+        * @param $prefix String [optional]
+        *
         *
         * @return string
         */
@@ -1923,10 +1928,10 @@ class Linker {
         * Creates a (show/hide) link for deleting revisions/log entries
         *
         * @param $query Array: query parameters to be passed to link()
-        * @param $restricted Boolean: set to true to use a <strong> instead of a <span>
+        * @param $restricted Boolean: set to true to use a "<strong>" instead of a "<span>"
         * @param $delete Boolean: set to true to use (show/hide) rather than (show)
         *
-        * @return String: HTML <a> link to Special:Revisiondelete, wrapped in a
+        * @return String: HTML "<a>" link to Special:Revisiondelete, wrapped in a
         * span to allow for customization of appearance with CSS
         */
        public static function revDeleteLink( $query = array(), $restricted = false, $delete = true ) {
index 0712ac8..1d0bcf7 100644 (file)
@@ -822,9 +822,7 @@ class LinksDeletionUpdate extends SqlDataUpdate {
        /**
         * Constructor
         *
-        * @param $title Title of the page we're updating
-        * @param $parserOutput ParserOutput: output from a full parse of this page
-        * @param $recursive Boolean: queue jobs for recursive updates?
+        * @param $page WikiPage Page we are updating
         */
        function __construct( WikiPage $page ) {
                parent::__construct( );
index a2023f5..d550cb6 100644 (file)
@@ -804,7 +804,7 @@ class OutputPage extends ContextSource {
        /**
         * Set $mRedirectedFrom, the Title of the page which redirected us to the current page.
         *
-        * param @t Title
+        * @param $t Title
         */
        public function setRedirectedFrom( $t ) {
                $this->mRedirectedFrom = $t;
@@ -2880,7 +2880,7 @@ $templates
        /**
         * Add one or more variables to be set in mw.config in JavaScript.
         *
-        * @param $key {String|Array} Key or array of key/value pars.
+        * @param $keys {String|Array} Key or array of key/value pairs.
         * @param $value {Mixed} [optional] Value of the configuration variable.
         */
        public function addJsConfigVars( $keys, $value = null ) {
index 3327826..fb8e022 100644 (file)
@@ -158,7 +158,7 @@ class RecentChange {
        }
 
        /**
-        * @return bool|\Title
+        * @return bool|Title
         */
        public function getMovedToTitle() {
                if( $this->mMovedToTitle === false ) {
index 3b500ae..43275a6 100644 (file)
@@ -213,7 +213,7 @@ class StringUtils {
         * Returns an Iterator
         * @param $separator
         * @param $subject
-        * @return ArrayIterator|\ExplodeIterator
+        * @return ArrayIterator|ExplodeIterator
         */
        static function explode( $separator, $subject ) {
                if ( substr_count( $subject, $separator ) > 1000 ) {
index ff5fc8a..4d01caa 100644 (file)
@@ -364,7 +364,7 @@ class LogEventsList extends ContextSource {
         * @param  $row
         * @param Title $title
         * @param Array $paramArray
-        * @param  $comment
+        * @param String $comment Passed by reference
         * @return String
         */
        private function logActionLinks( $row, $title, $paramArray, &$comment ) {
index 4fc7637..911fffc 100644 (file)
@@ -33,7 +33,7 @@ class PatrolLog {
         *
         * @param $rc Mixed: change identifier or RecentChange object
         * @param $auto Boolean: was this patrol event automatic?
-        * @param $performer User: user performing the action or null to use $wgUser
+        * @param $user User: user performing the action or null to use $wgUser
         *
         * @return bool
         */
index b41ac32..d0e7650 100644 (file)
@@ -282,6 +282,7 @@ abstract class MediaHandler {
         * Returns false if unknown or if the document is not multi-page.
         *
         * @param $image File
+        * @param $page Unused, left for backcompatibility?
         * @return array
         */
        function getPageDimensions( $image, $page ) {
index 324b3a6..464e507 100644 (file)
@@ -86,6 +86,7 @@ class MemcachedBagOStuff extends BagOStuff {
        /**
         * @param $key string
         * @param $value int
+        * @param $exptime int (default 0)
         * @return Mixed
         */
        public function add( $key, $value, $exptime = 0 ) {
index def1aee..02950f0 100644 (file)
@@ -209,6 +209,10 @@ class LinkHolderArray {
         * article length checks (for stub links) to be bundled into a single query.
         *
         * @param $nt Title
+        * @param $text String
+        * @param $query Array [optional]
+        * @param $trail String [optional]
+        * @param $prefix String [optional]
         * @return string
         */
        function makeHolder( $nt, $text = '', $query = array(), $trail = '', $prefix = ''  ) {
index 23352fa..6f6ffe0 100644 (file)
@@ -3521,7 +3521,7 @@ class Parser {
         * Static function to get a template
         * Can be overridden via ParserOptions::setTemplateCallback().
         *
-        * @parma $title Title
+        * @param $title  Title
         * @param $parser Parser
         *
         * @return array
@@ -3695,7 +3695,7 @@ class Parser {
         * Triple brace replacement -- used for template arguments
         * @private
         *
-        * @param $peice array
+        * @param $piece array
         * @param $frame PPFrame
         *
         * @return array
index bb99039..6a4ef0c 100644 (file)
@@ -119,8 +119,9 @@ class ParserCache {
         *
         * @todo Document parameter $useOutdated
         *
-        * @param $article Article
-        * @param $popts ParserOptions
+        * @param $article     Article
+        * @param $popts       ParserOptions
+        * @param $useOutdated Boolean (default true)
         * @return bool|mixed|string
         */
        public function getKey( $article, $popts, $useOutdated = true ) {
@@ -157,9 +158,9 @@ class ParserCache {
         * Retrieve the ParserOutput from ParserCache.
         * false if not found or outdated.
         *
-        * @param $article Article
-        * @param $popts ParserOptions
-        * @param $useOutdated
+        * @param $article     Article
+        * @param $popts       ParserOptions
+        * @param $useOutdated Boolean (default false)
         *
         * @return ParserOutput|bool False on failure
         */
index d8fdbe7..5aa2b49 100644 (file)
@@ -70,7 +70,7 @@ class SpecialProtectedpages extends SpecialPage {
 
        /**
         * Callback function to output a restriction
-        * @param $row object Protected title
+        * @param Title $row Protected title
         * @return string Formatted <li> element
         */
        public function formatRow( $row ) {
index 83c7235..fee870b 100644 (file)
@@ -597,6 +597,9 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
 
        /**
         * Do the write operations. Simple wrapper for RevDel_*List::setVisibility().
+        * @param $bitfield
+        * @param $reason
+        * @param $title
         * @return
         */
        protected function save( $bitfield, $reason, $title ) {
index 6052d09..1a00d73 100644 (file)
@@ -273,8 +273,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Output HTTP response of raw content
         * Side effect: writes HTTP response to STDOUT.
-        * @param String $content: content
-        * @param String $mimeType: mime type
+        * @param $content String content
+        * @param $contentType String mime type
         * @return bool
         */
        private function outputContents( $content, $contentType ) {
@@ -322,7 +322,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
        /**
         * Default action when we don't have a subpage -- just show links to the uploads we have,
         * Also show a button to clear stashed files
-        * @param Status : $status - the result of processRequest
+        * @param $status [optional] Status: the result of processRequest
         * @return bool
         */
        private function showUploads( $status = null ) {
index 7d91096..613e3b9 100644 (file)
@@ -274,7 +274,7 @@ class LoginForm extends SpecialPage {
 
        /**
         * @private
-        * @return bool|\User
+        * @return bool|User
         */
        function addNewAccountInternal() {
                global $wgAuth, $wgMemc, $wgAccountCreationThrottle,
index 8eb2781..243ca92 100644 (file)
@@ -614,6 +614,9 @@ abstract class UploadBase {
         * Really perform the upload. Stores the file in the local repo, watches
         * if necessary and runs the UploadComplete hook.
         *
+        * @param $comment
+        * @param $pageText
+        * @param $watch
         * @param $user User
         *
         * @return Status indicating the whether the upload succeeded.
index 12531c2..329ee22 100644 (file)
@@ -68,9 +68,11 @@ class UploadStash {
 
        /**
         * Represents a temporary filestore, with metadata in the database.
-        * Designed to be compatible with the session stashing code in UploadBase (should replace it eventually)
+        * Designed to be compatible with the session stashing code in UploadBase
+        * (should replace it eventually).
         *
         * @param $repo FileRepo
+        * @param $user User (default null)
         */
        public function __construct( FileRepo $repo, $user = null ) {
                // this might change based on wiki's configuration.
@@ -442,6 +444,7 @@ class UploadStash {
         * Helper function: do the actual database query to fetch file metadata.
         *
         * @param $key String: key
+        * @param $readFromDB: constant (default: DB_SLAVE)
         * @return boolean
         */
        protected function fetchFileMetadata( $key, $readFromDB = DB_SLAVE ) {
@@ -474,7 +477,6 @@ class UploadStash {
        /**
         * Helper function: Initialize the UploadStashFile for a given file.
         *
-        * @param $path String: path to file
         * @param $key String: key under which to store the object
         * @throws UploadStashZeroLengthFileException
         * @return bool
@@ -574,8 +576,8 @@ class UploadStashFile extends UnregisteredLocalFile {
 
        /**
         * Helper function -- given a 'subpage', return the local URL e.g. /wiki/Special:UploadStash/subpage
-        * @param {String} $subPage
-        * @return {String} local URL for this subpage in the Special:UploadStash space.
+        * @param $subPage String
+        * @return String: local URL for this subpage in the Special:UploadStash space.
         */
        private function getSpecialUrl( $subPage ) {
                return SpecialPage::getTitleFor( 'UploadStash', $subPage )->getLocalURL();