Fixed some @params documentation (maintenance)
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 17 Apr 2014 20:48:32 +0000 (22:48 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 17 Apr 2014 20:48:32 +0000 (22:48 +0200)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I727deec35a712de0f0c676cc87dfa661f1ee965b

53 files changed:
maintenance/Maintenance.php
maintenance/backup.inc
maintenance/backupPrefetch.inc
maintenance/backupTextPass.inc
maintenance/benchmarks/bench_delete_truncate.php
maintenance/benchmarks/benchmarkHooks.php
maintenance/benchmarks/benchmarkPurge.php
maintenance/checkSyntax.php
maintenance/cleanupImages.php
maintenance/compareParsers.php
maintenance/convertUserOptions.php
maintenance/copyFileBackend.php
maintenance/deleteArchivedRevisions.inc
maintenance/deleteOrphanedRevisions.php
maintenance/dumpIterator.php
maintenance/dumpUploads.php
maintenance/fetchText.php
maintenance/findHooks.php
maintenance/fixSlaveDesync.php
maintenance/generateJsonI18n.php
maintenance/generateSitemap.php
maintenance/importDump.php
maintenance/importImages.inc
maintenance/language/checkLanguage.inc
maintenance/language/languages.inc
maintenance/language/rebuildLanguage.php
maintenance/language/writeMessagesArray.inc
maintenance/namespaceDupes.php
maintenance/nextJobDB.php
maintenance/orphans.php
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/preprocessDump.php
maintenance/preprocessorFuzzTest.php
maintenance/pruneFileCache.php
maintenance/purgeList.php
maintenance/reassignEdits.php
maintenance/rebuildLocalisationCache.php
maintenance/refreshImageMetadata.php
maintenance/refreshLinks.php
maintenance/removeUnusedAccounts.php
maintenance/renderDump.php
maintenance/rollbackEdits.php
maintenance/runJobs.php
maintenance/sql.php
maintenance/sqlite.inc
maintenance/storage/compressOld.php
maintenance/storage/fixBug20757.php
maintenance/storage/recompressTracked.php
maintenance/syncFileBackend.php
maintenance/term/MWTerm.php
maintenance/userDupes.inc
maintenance/userOptions.inc

index d9ef350..5c05b1e 100644 (file)
@@ -134,7 +134,7 @@ abstract class Maintenance {
         * as a standalone class? It checks that the call stack only includes this
         * function and "requires" (meaning was called from the file scope)
         *
-        * @return Boolean
+        * @return bool
         */
        public static function shouldExecute() {
                $bt = debug_backtrace();
@@ -163,11 +163,11 @@ abstract class Maintenance {
         * Add a parameter to the script. Will be displayed on --help
         * with the associated description
         *
-        * @param $name String: the name of the param (help, version, etc)
-        * @param $description String: the description of the param to show on --help
-        * @param $required Boolean: is the param required?
-        * @param $withArg Boolean: is an argument required with this option?
-        * @param $shortName String: character to use as short name
+        * @param string $name The name of the param (help, version, etc)
+        * @param string $description The description of the param to show on --help
+        * @param bool $required Is the param required?
+        * @param bool $withArg Is an argument required with this option?
+        * @param string $shortName Character to use as short name
         */
        protected function addOption( $name, $description, $required = false, $withArg = false, $shortName = false ) {
                $this->mParams[$name] = array( 'desc' => $description, 'require' => $required, 'withArg' => $withArg, 'shortName' => $shortName );
@@ -178,8 +178,8 @@ abstract class Maintenance {
 
        /**
         * Checks to see if a particular param exists.
-        * @param $name String: the name of the param
-        * @return Boolean
+        * @param string $name The name of the param
+        * @return bool
         */
        protected function hasOption( $name ) {
                return isset( $this->mOptions[$name] );
@@ -187,9 +187,9 @@ abstract class Maintenance {
 
        /**
         * Get an option, or return the default
-        * @param $name String: the name of the param
-        * @param $default Mixed: anything you want, default null
-        * @return Mixed
+        * @param string $name The name of the param
+        * @param mixed $default Anything you want, default null
+        * @return mixed
         */
        protected function getOption( $name, $default = null ) {
                if ( $this->hasOption( $name ) ) {
@@ -203,9 +203,9 @@ abstract class Maintenance {
 
        /**
         * Add some args that are needed
-        * @param $arg String: name of the arg, like 'start'
-        * @param $description String: short description of the arg
-        * @param $required Boolean: is this required?
+        * @param string $arg Name of the arg, like 'start'
+        * @param string $description Short description of the arg
+        * @param bool $required Is this required?
         */
        protected function addArg( $arg, $description, $required = true ) {
                $this->mArgList[] = array(
@@ -217,7 +217,7 @@ abstract class Maintenance {
 
        /**
         * Remove an option.  Useful for removing options that won't be used in your script.
-        * @param $name String: the option to remove.
+        * @param string $name The option to remove.
         */
        protected function deleteOption( $name ) {
                unset( $this->mParams[$name] );
@@ -225,7 +225,7 @@ abstract class Maintenance {
 
        /**
         * Set the description text.
-        * @param $text String: the text of the description
+        * @param string $text The text of the description
         */
        protected function addDescription( $text ) {
                $this->mDescription = $text;
@@ -233,8 +233,8 @@ abstract class Maintenance {
 
        /**
         * Does a given argument exist?
-        * @param $argId Integer: the integer value (from zero) for the arg
-        * @return Boolean
+        * @param int $argId The integer value (from zero) for the arg
+        * @return bool
         */
        protected function hasArg( $argId = 0 ) {
                return isset( $this->mArgs[$argId] );
@@ -242,8 +242,8 @@ abstract class Maintenance {
 
        /**
         * Get an argument.
-        * @param $argId Integer: the integer value (from zero) for the arg
-        * @param $default Mixed: the default if it doesn't exist
+        * @param int $argId The integer value (from zero) for the arg
+        * @param mixed $default The default if it doesn't exist
         * @return mixed
         */
        protected function getArg( $argId = 0, $default = null ) {
@@ -252,7 +252,7 @@ abstract class Maintenance {
 
        /**
         * Set the batch size.
-        * @param $s Integer: the number of operations to do in a batch
+        * @param int $s The number of operations to do in a batch
         */
        protected function setBatchSize( $s = 0 ) {
                $this->mBatchSize = $s;
@@ -274,7 +274,7 @@ abstract class Maintenance {
 
        /**
         * Get the script's name
-        * @return String
+        * @return string
         */
        public function getName() {
                return $this->mSelf;
@@ -282,10 +282,9 @@ abstract class Maintenance {
 
        /**
         * Return input from stdin.
-        * @param $len Integer: the number of bytes to read. If null,
-        *        just return the handle. Maintenance::STDIN_ALL returns
-        *        the full length
-        * @return Mixed
+        * @param int $len The number of bytes to read. If null, just return the handle.
+        *   Maintenance::STDIN_ALL returns the full length
+        * @return mixed
         */
        protected function getStdin( $len = null ) {
                if ( $len == Maintenance::STDIN_ALL ) {
@@ -310,9 +309,8 @@ abstract class Maintenance {
        /**
         * Throw some output to the user. Scripts can call this with no fears,
         * as we handle all --quiet stuff here
-        * @param $out String: the text to show to the user
-        * @param $channel Mixed: unique identifier for the channel. See
-        *     function outputChanneled.
+        * @param string $out The text to show to the user
+        * @param mixed $channel Unique identifier for the channel. See function outputChanneled.
         */
        protected function output( $out, $channel = null ) {
                if ( $this->mQuiet ) {
@@ -330,8 +328,8 @@ abstract class Maintenance {
        /**
         * Throw an error to the user. Doesn't respect --quiet, so don't use
         * this for non-error output
-        * @param $err String: the error to display
-        * @param $die Int: if > 0, go ahead and die out using this int as the code
+        * @param string $err The error to display
+        * @param int $die If > 0, go ahead and die out using this int as the code
         */
        protected function error( $err, $die = 0 ) {
                $this->outputChanneled( false );
@@ -363,8 +361,8 @@ abstract class Maintenance {
         * Message outputter with channeled message support. Messages on the
         * same channel are concatenated, but any intervening messages in another
         * channel start a new line.
-        * @param $msg String: the message without trailing newline
-        * @param $channel string Channel identifier or null for no
+        * @param string $msg The message without trailing newline
+        * @param string $channel Channel identifier or null for no
         *     channel. Channel comparison uses ===.
         */
        public function outputChanneled( $msg, $channel = null ) {
@@ -397,7 +395,7 @@ abstract class Maintenance {
         *    Maintenance::DB_NONE  -  For no DB access at all
         *    Maintenance::DB_STD   -  For normal DB access, default
         *    Maintenance::DB_ADMIN -  For admin DB access
-        * @return Integer
+        * @return int
         */
        public function getDbType() {
                return Maintenance::DB_STD;
@@ -440,9 +438,9 @@ abstract class Maintenance {
        /**
         * Run a child maintenance script. Pass all of the current arguments
         * to it.
-        * @param $maintClass String: a name of a child maintenance class
-        * @param $classFile String: full path of where the child is
-        * @return Maintenance child
+        * @param string $maintClass A name of a child maintenance class
+        * @param string $classFile Full path of where the child is
+        * @return Maintenance
         */
        public function runChild( $maintClass, $classFile = null ) {
                // Make sure the class is loaded first
@@ -563,9 +561,9 @@ abstract class Maintenance {
         * $mOptions becomes an array with keys set to the option names
         * $mArgs becomes a zero-based array containing the non-option arguments
         *
-        * @param $self String The name of the script, if any
-        * @param $opts Array An array of options, in form of key=>value
-        * @param $args Array An array of command line arguments
+        * @param string $self The name of the script, if any
+        * @param array $opts An array of options, in form of key=>value
+        * @param array $args An array of command line arguments
         */
        public function loadParamsAndArgs( $self = null, $opts = null, $args = null ) {
                # If we were given opts or args, set those and return early
@@ -708,7 +706,7 @@ abstract class Maintenance {
 
        /**
         * Maybe show the help.
-        * @param $force boolean Whether to force the help to show, default false
+        * @param bool $force Whether to force the help to show, default false
         */
        protected function maybeHelp( $force = false ) {
                if ( !$force && !$this->hasOption( 'help' ) ) {
@@ -908,7 +906,7 @@ abstract class Maintenance {
 
        /**
         * Generic setup for most installs. Returns the location of LocalSettings
-        * @return String
+        * @return string
         */
        public function loadSettings() {
                global $wgCommandLineMode, $IP;
@@ -940,7 +938,7 @@ abstract class Maintenance {
 
        /**
         * Support function for cleaning up redundant text records
-        * @param $delete Boolean: whether or not to actually delete the records
+        * @param bool $delete Whether or not to actually delete the records
         * @author Rob Church <robchur@gmail.com>
         */
        public function purgeRedundantText( $delete = true ) {
@@ -1018,7 +1016,7 @@ abstract class Maintenance {
        /**
         * Sets database object to be returned by getDB().
         *
-        * @param $db DatabaseBase: Database object to be used
+        * @param DatabaseBase $db Database object to be used
         */
        public function setDB( &$db ) {
                $this->mDb = $db;
@@ -1026,7 +1024,7 @@ abstract class Maintenance {
 
        /**
         * Lock the search index
-        * @param &$db DatabaseBase object
+        * @param DatabaseBase &$db
         */
        private function lockSearchindex( &$db ) {
                $write = array( 'searchindex' );
@@ -1036,7 +1034,7 @@ abstract class Maintenance {
 
        /**
         * Unlock the tables
-        * @param &$db DatabaseBase object
+        * @param DatabaseBase &$db
         */
        private function unlockSearchindex( &$db ) {
                $db->unlockTables( __CLASS__ . '::' . __METHOD__ );
@@ -1045,7 +1043,7 @@ abstract class Maintenance {
        /**
         * Unlock and lock again
         * Since the lock is low-priority, queued reads will be able to complete
-        * @param &$db DatabaseBase object
+        * @param DatabaseBase &$db
         */
        private function relockSearchindex( &$db ) {
                $this->unlockSearchindex( $db );
@@ -1054,10 +1052,10 @@ abstract class Maintenance {
 
        /**
         * Perform a search index update with locking
-        * @param $maxLockTime Integer: the maximum time to keep the search index locked.
-        * @param $callback callback String: the function that will update the function.
-        * @param $dbw DatabaseBase object
-        * @param $results
+        * @param int $maxLockTime The maximum time to keep the search index locked.
+        * @param string $callback The function that will update the function.
+        * @param DatabaseBase $dbw
+        * @param array $results
         */
        public function updateSearchIndex( $maxLockTime, $callback, $dbw, $results ) {
                $lockTime = time();
@@ -1093,8 +1091,8 @@ abstract class Maintenance {
 
        /**
         * Update the searchindex table for a given pageid
-        * @param $dbw DatabaseBase a database write handle
-        * @param $pageId Integer: the page ID to update.
+        * @param DatabaseBase $dbw A database write handle
+        * @param int $pageId The page ID to update.
         * @return null|string
         */
        public function updateSearchIndexForPage( $dbw, $pageId ) {
@@ -1118,7 +1116,7 @@ abstract class Maintenance {
         * We default as considering stdin a tty (for nice readline methods)
         * but treating stout as not a tty to avoid color codes
         *
-        * @param $fd int File descriptor
+        * @param int $fd File descriptor
         * @return bool
         */
        public static function posix_isatty( $fd ) {
@@ -1131,8 +1129,8 @@ abstract class Maintenance {
 
        /**
         * Prompt the console for input
-        * @param $prompt String what to begin the line with, like '> '
-        * @return String response
+        * @param string $prompt What to begin the line with, like '> '
+        * @return string Response
         */
        public static function readconsole( $prompt = '> ' ) {
                static $isatty = null;
@@ -1162,8 +1160,8 @@ abstract class Maintenance {
 
        /**
         * Emulate readline()
-        * @param $prompt String what to begin the line with, like '> '
-        * @return String
+        * @param string $prompt What to begin the line with, like '> '
+        * @return string
         */
        private static function readlineEmulation( $prompt ) {
                $bash = Installer::locateExecutableInDefaultPaths( array( 'bash' ) );
@@ -1241,7 +1239,7 @@ abstract class LoggedUpdateMaintenance extends Maintenance {
 
        /**
         * Message to show that the update was done already and was just skipped
-        * @return String
+        * @return string
         */
        protected function updateSkippedMessage() {
                $key = $this->getUpdateKey();
@@ -1250,7 +1248,7 @@ abstract class LoggedUpdateMaintenance extends Maintenance {
 
        /**
         * Message to show the the update log was unable to log the completion of this update
-        * @return String
+        * @return string
         */
        protected function updatelogFailedMessage() {
                $key = $this->getUpdateKey();
@@ -1260,13 +1258,13 @@ abstract class LoggedUpdateMaintenance extends Maintenance {
        /**
         * Do the actual work. All child classes will need to implement this.
         * Return true to log the update as done or false (usually on failure).
-        * @return Bool
+        * @return bool
         */
        abstract protected function doDBUpdates();
 
        /**
         * Get the update key name to go in the update log table
-        * @return String
+        * @return string
         */
        abstract protected function getUpdateKey();
 }
index 7161b04..323a870 100644 (file)
@@ -92,16 +92,16 @@ class BackupDumper {
        }
 
        /**
-        * @param $name String
-        * @param $class String: name of output filter plugin class
+        * @param string $name
+        * @param string $class Name of output filter plugin class
         */
        function registerOutput( $name, $class ) {
                $this->outputTypes[$name] = $class;
        }
 
        /**
-        * @param $name String
-        * @param $class String: name of filter plugin class
+        * @param string $name
+        * @param string $class Name of filter plugin class
         */
        function registerFilter( $name, $class ) {
                $this->filterTypes[$name] = $class;
@@ -110,9 +110,9 @@ class BackupDumper {
        /**
         * Load a plugin and register it
         *
-        * @param $class String: name of plugin class; must have a static 'register'
-        *               method that takes a BackupDumper as a parameter.
-        * @param $file String: full or relative path to the PHP file to load, or empty
+        * @param string $class Name of plugin class; must have a static 'register'
+        *   method that takes a BackupDumper as a parameter.
+        * @param string $file Full or relative path to the PHP file to load, or empty
         */
        function loadPlugin( $class, $file ) {
                if ( $file != '' ) {
@@ -123,8 +123,8 @@ class BackupDumper {
        }
 
        /**
-        * @param $args Array
-        * @return Array
+        * @param array $args
+        * @return array
         */
        function processArgs( $args ) {
                $sink = null;
@@ -248,7 +248,7 @@ class BackupDumper {
         * Initialise starting time and maximum revision count.
         * We'll make ETA calculations based an progress, assuming relatively
         * constant per-revision rate.
-        * @param $history Integer: WikiExporter::CURRENT or WikiExporter::FULL
+        * @param int $history WikiExporter::CURRENT or WikiExporter::FULL
         */
        function initProgress( $history = WikiExporter::FULL ) {
                $table = ( $history == WikiExporter::CURRENT ) ? 'page' : 'revision';
@@ -289,9 +289,8 @@ class BackupDumper {
         * Force the dump to use the provided database connection for database
         * operations, wherever possible.
         *
-        * @param $db DatabaseBase|null: (Optional) the database connection to
-        *            use. If null, resort to use the globally provided ways to
-        *            get database connections.
+        * @param DatabaseBase|null $db (Optional) the database connection to use. If null, resort to
+        *   use the globally provided ways to get database connections.
         */
        function setDb( DatabaseBase $db = null ) {
                $this->forcedDb = $db;
index a0ff7fe..6d41c18 100644 (file)
@@ -64,9 +64,9 @@ class BaseDump {
         * from the dump stream. May return null if the page is
         * unavailable.
         *
-        * @param $page Integer: ID number of page to read
-        * @param $rev Integer: ID number of revision to read
-        * @return string or null
+        * @param int $page ID number of page to read
+        * @param int $rev ID number of revision to read
+        * @return string|null
         */
        function prefetch( $page, $rev ) {
                $page = intval( $page );
@@ -142,8 +142,8 @@ class BaseDump {
 
        /**
         * @access private
-        * @param $name string
-        * @param $parent string
+        * @param string $name
+        * @param string $parent
         * @return bool|null
         */
        function skipTo( $name, $parent = 'page' ) {
@@ -169,7 +169,7 @@ class BaseDump {
         * Fetches text contents of the current element, assuming
         * no sub-elements or such scary things.
         *
-        * @return String
+        * @return string
         * @access private
         */
        function nodeContents() {
index 24e7634..d210c3a 100644 (file)
@@ -405,7 +405,7 @@ class TextPassDumper extends BackupDumper {
         * $this->maxConsecutiveFailedTextRetrievals consecutive calls to getText, MWException
         * is thrown.
         *
-        * @param $id string The revision id to get the text for
+        * @param string $id The revision id to get the text for
         *
         * @return string The revision text for $id, or ""
         * @throws MWException
@@ -555,7 +555,7 @@ class TextPassDumper extends BackupDumper {
 
        /**
         * May throw a database error if, say, the server dies during query.
-        * @param $id
+        * @param int $id
         * @return bool|string
         * @throws MWException
         */
index 9f11c63..ea22b6d 100644 (file)
@@ -70,7 +70,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        private function insertData( $dbw ) {
@@ -83,7 +83,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        private function delete( $dbw ) {
@@ -91,7 +91,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        private function truncate( $dbw ) {
index 3f5d6db..59d3bdf 100644 (file)
@@ -61,7 +61,7 @@ class BenchmarkHooks extends Benchmarker {
        }
 
        /**
-        * @param $trials int
+        * @param int $trials
         * @return string
         */
        private function benchHooks( $trials = 10 ) {
index fd863d5..1797358 100644 (file)
@@ -57,8 +57,8 @@ class BenchmarkPurge extends Benchmarker {
        /**
         * Run a bunch of URLs through SquidUpdate::purge()
         * to benchmark Squid response times.
-        * @param $urls array A bunch of URLs to purge
-        * @param $trials int How many times to run the test?
+        * @param array $urls A bunch of URLs to purge
+        * @param int $trials How many times to run the test?
         * @return string
         */
        private function benchSquid( $urls, $trials = 1 ) {
@@ -75,7 +75,7 @@ class BenchmarkPurge extends Benchmarker {
 
        /**
         * Get an array of randomUrl()'s.
-        * @param $length int How many urls to add to the array
+        * @param int $length How many urls to add to the array
         * @return array
         */
        private function randomUrlList( $length ) {
index 297c972..ef88545 100644 (file)
@@ -159,8 +159,8 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Returns a list of tracked files in a Git work tree differing from the master branch.
-        * @param $path string: Path to the repository
-        * @return array: Resulting list of changed files
+        * @param string $path Path to the repository
+        * @return array Resulting list of changed files
         */
        private function getGitModifiedFiles( $path ) {
 
@@ -212,7 +212,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Returns true if $file is of a type we can check
-        * @param $file string
+        * @param string $file
         * @return bool
         */
        private function isSuitableFile( $file ) {
@@ -232,7 +232,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Add given path to file list, searching it in include path if needed
-        * @param $path string
+        * @param string $path
         * @return bool
         */
        private function addPath( $path ) {
@@ -242,7 +242,7 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Add given file to file list, or, if it's a directory, add its content
-        * @param $path string
+        * @param string $path
         * @return bool
         */
        private function addFileOrDir( $path ) {
@@ -259,7 +259,7 @@ class CheckSyntax extends Maintenance {
        /**
         * Add all suitable files in given directory or its subdirectories to the file list
         *
-        * @param $dir String: directory to process
+        * @param string $dir Directory to process
         */
        private function addDirectoryContent( $dir ) {
                $iterator = new RecursiveIteratorIterator(
@@ -276,8 +276,8 @@ class CheckSyntax extends Maintenance {
        /**
         * Check a file for syntax errors using Parsekit. Shamelessly stolen
         * from tools/lint.php by TimStarling
-        * @param $file String Path to a file to check for syntax errors
-        * @return boolean
+        * @param string $file Path to a file to check for syntax errors
+        * @return bool
         */
        private function checkFileWithParsekit( $file ) {
                static $okErrors = array(
@@ -304,8 +304,8 @@ class CheckSyntax extends Maintenance {
 
        /**
         * Check a file for syntax errors using php -l
-        * @param $file String Path to a file to check for syntax errors
-        * @return boolean
+        * @param string $file Path to a file to check for syntax errors
+        * @return bool
         */
        private function checkFileWithCli( $file ) {
                $res = exec( 'php -l ' . wfEscapeShellArg( $file ) );
@@ -321,8 +321,8 @@ class CheckSyntax extends Maintenance {
         * Check a file for non-fatal coding errors, such as byte-order marks in the beginning
         * or pointless ?> closing tags at the end.
         *
-        * @param $file String String Path to a file to check for errors
-        * @return boolean
+        * @param string $file String Path to a file to check for errors
+        * @return bool
         */
        private function checkForMistakes( $file ) {
                foreach ( $this->mNoStyleCheckPaths as $regex ) {
index d42497d..01ed9ca 100644 (file)
@@ -96,7 +96,7 @@ class ImageCleanup extends TableCleanup {
        }
 
        /**
-        * @param $name string
+        * @param string $name
         */
        private function killRow( $name ) {
                if ( $this->dryrun ) {
index 723a6bf..f33ff40 100644 (file)
@@ -101,7 +101,7 @@ class CompareParsers extends DumpIterator {
 
        /**
         * Callback function for each revision, parse with both parsers and compare
-        * @param $rev Revision
+        * @param Revision $rev
         */
        public function processRevision( $rev ) {
                $title = $rev->getTitle();
index 34c643b..24be2b4 100644 (file)
@@ -68,8 +68,8 @@ class ConvertUserOptions extends Maintenance {
        }
 
        /**
-        * @param $res
-        * @param $dbw DatabaseBase
+        * @param ResultWrapper $res
+        * @param DatabaseBase $dbw
         * @return null|int
         */
        function convertOptionBatch( $res, $dbw ) {
index 8bacb26..86e47af 100644 (file)
@@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php';
  * @ingroup Maintenance
  */
 class CopyFileBackend extends Maintenance {
-       /** @var Array|null (path sha1 => stat) Pre-computed dst stat entries from listings */
+       /** @var array|null (path sha1 => stat) Pre-computed dst stat entries from listings */
        protected $statCache = null;
 
        public function __construct() {
index dd8e3dd..62465ab 100644 (file)
@@ -31,7 +31,7 @@ class DeleteArchivedRevisionsImplementation {
        /**
         * Perform the delete on archived revisions.
 
-        * @param $maint Object An object (typically of class Maintenance)
+        * @param object $maint An object (typically of class Maintenance)
         * that implements two methods: handleOutput() and
         * purgeRedundantText().  See Maintenance for a description of
         * those methods.
index f0a9692..9922a1d 100644 (file)
@@ -80,8 +80,8 @@ class DeleteOrphanedRevisions extends Maintenance {
         * Delete one or more revisions from the database
         * Do this inside a transaction
         *
-        * @param $id Array of revision id values
-        * @param $dbw DatabaseBase class (needs to be a master)
+        * @param array $id Array of revision id values
+        * @param DatabaseBase $dbw DatabaseBase class (needs to be a master)
         */
        private function deleteRevs( $id, &$dbw ) {
                if ( !is_array( $id ) ) {
index c6b3958..cf3523e 100644 (file)
@@ -112,7 +112,7 @@ abstract class DumpIterator extends Maintenance {
        /**
         * Callback function for each revision, child classes should override
         * processRevision instead.
-        * @param $rev Revision
+        * @param DatabaseBase $rev
         */
        public function handleRevision( $rev ) {
                $title = $rev->getTitle();
@@ -167,7 +167,7 @@ class SearchDump extends DumpIterator {
        }
 
        /**
-        * @param $rev Revision
+        * @param Revision $rev
         */
        public function processRevision( $rev ) {
                if ( preg_match( $this->getOption( 'regex' ), $rev->getContent()->getTextForSearchIndex() ) ) {
index 0ec1955..d6c70f8 100644 (file)
@@ -73,7 +73,7 @@ By default, outputs relative paths against the parent directory of \$wgUploadDir
        /**
         * Fetch a list of used images from a particular image source.
         *
-        * @param $shared Boolean: true to pass shared-dir settings to hash func
+        * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchUsed( $shared ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -94,7 +94,7 @@ By default, outputs relative paths against the parent directory of \$wgUploadDir
        /**
         * Fetch a list of all images from a particular image source.
         *
-        * @param $shared Boolean: true to pass shared-dir settings to hash func
+        * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchLocal( $shared ) {
                $dbr = wfGetDB( DB_SLAVE );
index 05470d3..df5a208 100644 (file)
@@ -69,9 +69,9 @@ class FetchText extends Maintenance {
 
        /**
         * May throw a database error if, say, the server dies during query.
-        * @param $db DatabaseBase object
-        * @param $id int The old_id
-        * @return String
+        * @param DatabaseBase $db
+        * @param int $id The old_id
+        * @return string
         */
        private function doGetText( $db, $id ) {
                $id = intval( $id );
index 6d7de09..82c5b95 100644 (file)
@@ -142,8 +142,8 @@ class FindHooks extends Maintenance {
 
        /**
         * Get hooks from a local file (for example docs/hooks.txt)
-        * @param $doc string: filename to look in
-        * @return array of documented hooks
+        * @param string $doc filename to look in
+        * @return array Array of documented hooks
         */
        private function getHooksFromLocalDoc( $doc ) {
                        $m = array();
@@ -184,7 +184,7 @@ class FindHooks extends Maintenance {
 
        /**
         * Get hooks from a PHP file
-        * @param $file string Full filename to the PHP file.
+        * @param string $file Full filename to the PHP file.
         * @return array of hooks found.
         */
        private function getHooksFromFile( $file ) {
@@ -196,8 +196,8 @@ class FindHooks extends Maintenance {
 
        /**
         * Get hooks from the source code.
-        * @param $path Directory where the include files can be found
-        * @return array of hooks found.
+        * @param string $path Directory where the include files can be found
+        * @return array Array of hooks found.
         */
        private function getHooksFromPath( $path ) {
                $hooks = array();
@@ -215,8 +215,8 @@ class FindHooks extends Maintenance {
 
        /**
         * Get bad hooks (where the hook name could not be determined) from a PHP file
-        * @param $file string Full filename to the PHP file.
-        * @return array of bad wfRunHooks() lines
+        * @param string $file Full filename to the PHP file.
+        * @return array Array of bad wfRunHooks() lines
         */
        private function getBadHooksFromFile( $file ) {
                $content = file_get_contents( $file );
@@ -232,8 +232,8 @@ class FindHooks extends Maintenance {
 
        /**
         * Get bad hooks from the source code.
-        * @param $path Directory where the include files can be found
-        * @return array of bad wfRunHooks() lines
+        * @param string $path Directory where the include files can be found
+        * @return array Array of bad wfRunHooks() lines
         */
        private function getBadHooksFromPath( $path ) {
                $hooks = array();
@@ -252,9 +252,9 @@ class FindHooks extends Maintenance {
 
        /**
         * Nicely output the array
-        * @param $msg String: a message to show before the value
-        * @param $arr Array: an array
-        * @param $sort Boolean: whether to sort the array (Default: true)
+        * @param string $msg A message to show before the value
+        * @param array $arr
+        * @param bool $sort Whether to sort the array (Default: true)
         */
        private function printArray( $msg, $arr, $sort = true ) {
                if ( $sort ) {
index e4e557f..a09a742 100644 (file)
@@ -92,7 +92,7 @@ class FixSlaveDesync extends Maintenance {
 
        /**
         * Fix a broken page entry
-        * @param $pageID int The page_id to fix
+        * @param int $pageID The page_id to fix
         */
        private function desyncFixPage( $pageID ) {
                # Check for a corrupted page_latest
index 8dc89ed..23c134b 100644 (file)
@@ -165,7 +165,7 @@ PHP;
        /**
         * Get an array of author names from a documentation comment containing @author declarations.
         * @param string $comment Documentation comment
-        * @return Array of author names (strings)
+        * @return array Array of author names (strings)
         */
        protected function getAuthorsFromComment( $comment ) {
                $matches = null;
index ab28c8b..959cc8f 100644 (file)
@@ -218,7 +218,7 @@ class GenerateSitemap extends Maintenance {
 
        /**
         * Create directory if it does not exist and return pathname with a trailing slash
-        * @param $fspath string
+        * @param string $fspath
         * @return null|string
         */
        private static function init_path( $fspath ) {
@@ -262,8 +262,8 @@ class GenerateSitemap extends Maintenance {
        /**
         * Get the priority of a given namespace
         *
-        * @param $namespace Integer: the namespace to get the priority for
-        * @return String
+        * @param int $namespace The namespace to get the priority for
+        * @return string
         */
        function priority( $namespace ) {
                return isset( $this->priorities[$namespace] ) ? $this->priorities[$namespace] : $this->guessPriority( $namespace );
@@ -274,8 +274,8 @@ class GenerateSitemap extends Maintenance {
         * default priority for the namespace, varies depending on whether it's
         * a talkpage or not.
         *
-        * @param $namespace Integer: the namespace to get the priority for
-        * @return String
+        * @param int $namespace The namespace to get the priority for
+        * @return string
         */
        function guessPriority( $namespace ) {
                return MWNamespace::isSubject( $namespace ) ? $this->priorities[self::GS_MAIN] : $this->priorities[self::GS_TALK];
@@ -284,7 +284,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return a database resolution of all the pages in a given namespace
         *
-        * @param $namespace Integer: limit the query to this namespace
+        * @param int $namespace Limit the query to this namespace
         * @return Resource
         */
        function getPageRes( $namespace ) {
@@ -372,7 +372,9 @@ class GenerateSitemap extends Maintenance {
        /**
         * gzopen() / fopen() wrapper
         *
-        * @return Resource
+        * @param string $file
+        * @param string $flags
+        * @return resource
         */
        function open( $file, $flags ) {
                $resource = $this->compress ? gzopen( $file, $flags ) : fopen( $file, $flags );
@@ -384,6 +386,9 @@ class GenerateSitemap extends Maintenance {
 
        /**
         * gzwrite() / fwrite() wrapper
+        *
+        * @param resource $handle
+        * @param string $str
         */
        function write( &$handle, $str ) {
                if ( $handle === true || $handle === false ) {
@@ -398,6 +403,8 @@ class GenerateSitemap extends Maintenance {
 
        /**
         * gzclose() / fclose() wrapper
+        *
+        * @param resource $handle
         */
        function close( &$handle ) {
                if ( $this->compress ) {
@@ -410,9 +417,9 @@ class GenerateSitemap extends Maintenance {
        /**
         * Get a sitemap filename
         *
-        * @param $namespace Integer: the namespace
-        * @param $count Integer: the count
-        * @return String
+        * @param int $namespace The namespace
+        * @param int $count The count
+        * @return string
         */
        function sitemapFilename( $namespace, $count ) {
                $ext = $this->compress ? '.gz' : '';
@@ -431,7 +438,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML schema being used
         *
-        * @return String
+        * @return string
         */
        function xmlSchema() {
                return 'http://www.sitemaps.org/schemas/sitemap/0.9';
@@ -440,7 +447,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML required to open a sitemap index file
         *
-        * @return String
+        * @return string
         */
        function openIndex() {
                return $this->xmlHead() . '<sitemapindex xmlns="' . $this->xmlSchema() . '">' . "\n";
@@ -449,8 +456,8 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML for a single sitemap indexfile entry
         *
-        * @param $filename String: the filename of the sitemap file
-        * @return String
+        * @param string $filename The filename of the sitemap file
+        * @return string
         */
        function indexEntry( $filename ) {
                return
@@ -463,7 +470,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML required to close a sitemap index file
         *
-        * @return String
+        * @return string
         */
        function closeIndex() {
                return "</sitemapindex>\n";
@@ -472,7 +479,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML required to open a sitemap file
         *
-        * @return String
+        * @return string
         */
        function openFile() {
                return $this->xmlHead() . '<urlset xmlns="' . $this->xmlSchema() . '">' . "\n";
@@ -481,10 +488,10 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML for a single sitemap entry
         *
-        * @param $url String: an RFC 2396 compliant URL
-        * @param $date String: a ISO 8601 date
-        * @param $priority String: a priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize
-        * @return String
+        * @param string $url An RFC 2396 compliant URL
+        * @param string $date A ISO 8601 date
+        * @param string $priority A priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize
+        * @return string
         */
        function fileEntry( $url, $date, $priority ) {
                return
@@ -499,7 +506,7 @@ class GenerateSitemap extends Maintenance {
        /**
         * Return the XML required to close sitemap file
         *
-        * @return String
+        * @return string
         */
        function closeFile() {
                return "</urlset>\n";
@@ -507,6 +514,8 @@ class GenerateSitemap extends Maintenance {
 
        /**
         * Populate $this->limit
+        *
+        * @param int $namespace
         */
        function generateLimit( $namespace ) {
                // bug 17961: make a title with the longest possible URL in this namespace
index cec6a0e..61189b7 100644 (file)
@@ -122,7 +122,7 @@ TEXT;
        }
 
        /**
-        * @param $obj Title|Revision
+        * @param Title|Revision $obj
         * @return bool
         */
        private function skippedNamespace( $obj ) {
@@ -144,8 +144,7 @@ TEXT;
        }
 
        /**
-        * @param $rev Revision
-        * @return mixed
+        * @param Revision $rev
         */
        function handleRevision( $rev ) {
                $title = $rev->getTitle();
@@ -167,7 +166,7 @@ TEXT;
        }
 
        /**
-        * @param $revision Revision
+        * @param Revision $revision
         * @return bool
         */
        function handleUpload( $revision ) {
index 5ae6d6b..ae93287 100644 (file)
 /**
  * Search a directory for files with one of a set of extensions
  *
- * @param $dir string Path to directory to search
- * @param $exts Array of extensions to search for
- * @param $recurse Bool Search subdirectories recursively
- * @return mixed Array of filenames on success, or false on failure
+ * @param string $dir Path to directory to search
+ * @param array $exts Array of extensions to search for
+ * @param bool $recurse Search subdirectories recursively
+ * @return array|bool Array of filenames on success, or false on failure
  */
 function findFiles( $dir, $exts, $recurse = false ) {
        if ( is_dir( $dir ) ) {
@@ -58,7 +58,7 @@ function findFiles( $dir, $exts, $recurse = false ) {
 /**
  * Split a filename into filename and extension
  *
- * @param $filename string Filename
+ * @param string $filename Filename
  * @return array
  */
 function splitFilename( $filename ) {
@@ -78,10 +78,10 @@ function splitFilename( $filename ) {
  * files for acme.foo.bar and the extension ".txt". With $maxStrip = 2,
  * acme.txt would also be acceptable.
  *
- * @param $file string base path
- * @param $auxExtension string the extension to be appended to the base path
- * @param $maxStrip int the maximum number of extensions to strip from the base path (default: 1)
- * @return string or false
+ * @param string $file Base path
+ * @param string $auxExtension The extension to be appended to the base path
+ * @param int $maxStrip The maximum number of extensions to strip from the base path (default: 1)
+ * @return string|bool
  */
 function findAuxFile( $file, $auxExtension, $maxStrip = 1 ) {
        if ( strpos( $auxExtension, '.' ) !== 0 ) {
index ac70ead..990f258 100644 (file)
@@ -41,7 +41,7 @@ class CheckLanguageCLI {
 
        /**
         * Constructor.
-        * @param $options array Options for script.
+        * @param array $options Options for script.
         */
        public function __construct( array $options ) {
                if ( isset( $options['help'] ) ) {
@@ -118,7 +118,7 @@ class CheckLanguageCLI {
 
        /**
         * Get the checks that can easily be treated by non-speakers of the language.
-        * @return Array A list of the easy checks.
+        * @return array A list of the easy checks.
         */
        protected function easyChecks() {
                return array(
@@ -378,7 +378,7 @@ ENDS;
 
        /**
         * Check a language.
-        * @param $code string The language code.
+        * @param string $code The language code.
         * @throws MWException
         * @return array The results.
         */
@@ -410,8 +410,8 @@ ENDS;
 
        /**
         * Format a message key.
-        * @param $key string The message key.
-        * @param $code string The language code.
+        * @param string $key The message key.
+        * @param string $code The language code.
         * @return string The formatted message key.
         */
        protected function formatKey( $key, $code ) {
@@ -558,8 +558,8 @@ class CheckExtensionsCLI extends CheckLanguageCLI {
 
        /**
         * Constructor.
-        * @param $options array Options for script.
-        * @param $extension string The extension name (or names).
+        * @param array $options Options for script.
+        * @param string $extension The extension name (or names).
         */
        public function __construct( array $options, $extension ) {
                if ( isset( $options['help'] ) ) {
@@ -662,7 +662,7 @@ class CheckExtensionsCLI extends CheckLanguageCLI {
 
        /**
         * Get the checks that can easily be treated by non-speakers of the language.
-        * @return arrayA list of the easy checks.
+        * @return array A list of the easy checks.
         */
        protected function easyChecks() {
                return array(
@@ -733,7 +733,7 @@ ENDS;
 
        /**
         * Check a language and show the results.
-        * @param $code string The language code.
+        * @param string $code The language code.
         * @throws MWException
         */
        protected function checkLanguage( $code ) {
index 0483aea..fa7e11c 100644 (file)
@@ -62,7 +62,7 @@ class Languages {
         * Load the list of languages: all the Messages*.php
         * files in the languages directory.
         *
-        * @param $exif bool Treat the Exif messages?
+        * @param bool $exif Treat the Exif messages?
         */
        function __construct( $exif = true ) {
                require __DIR__ . '/messageTypes.inc';
@@ -107,7 +107,7 @@ class Languages {
        /**
         * Load the language file.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         */
        protected function loadFile( $code ) {
                if ( isset( $this->mRawMessages[$code] ) &&
@@ -165,7 +165,7 @@ class Languages {
         * translated - messages which are either required or optional, but translated from
         *   English and needed.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         */
        private function loadMessages( $code ) {
                if ( isset( $this->mMessages[$code] ) ) {
@@ -237,7 +237,7 @@ class Languages {
         * translated - messages which are either required or optional, but translated from
         *   English and needed.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return string The messages in this language.
         */
@@ -269,7 +269,7 @@ class Languages {
        /**
         * Get fallback language code for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return string Fallback code.
         */
@@ -282,7 +282,7 @@ class Languages {
        /**
         * Get namespace names for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array Namespace names.
         */
@@ -295,7 +295,7 @@ class Languages {
        /**
         * Get namespace aliases for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array Namespace aliases.
         */
@@ -308,7 +308,7 @@ class Languages {
        /**
         * Get magic words for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array Magic words.
         */
@@ -321,7 +321,7 @@ class Languages {
        /**
         * Get special page aliases for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array Special page aliases.
         */
@@ -334,7 +334,7 @@ class Languages {
        /**
         * Get the untranslated messages for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The untranslated messages for this language.
         */
@@ -348,7 +348,7 @@ class Languages {
        /**
         * Get the duplicate messages for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The duplicate messages for this language.
         */
@@ -368,7 +368,7 @@ class Languages {
        /**
         * Get the obsolete messages for a specific language.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The obsolete messages for this language.
         */
@@ -382,7 +382,7 @@ class Languages {
        /**
         * Get the messages whose variables do not match the original ones.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages whose variables do not match the original ones.
         */
@@ -416,7 +416,7 @@ class Languages {
        /**
         * Get the messages which do not use plural.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages which do not use plural in this language.
         */
@@ -438,7 +438,7 @@ class Languages {
        /**
         * Get the empty messages.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The empty messages for this language.
         */
@@ -458,7 +458,7 @@ class Languages {
        /**
         * Get the messages with trailing whitespace.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages with trailing whitespace in this language.
         */
@@ -478,7 +478,7 @@ class Languages {
        /**
         * Get the non-XHTML messages.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The non-XHTML messages for this language.
         */
@@ -507,7 +507,7 @@ class Languages {
        /**
         * Get the messages which include wrong characters.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages which include wrong characters in this language.
         */
@@ -545,7 +545,7 @@ class Languages {
        /**
         * Get the messages which include dubious links.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages which include dubious links in this language.
         */
@@ -575,7 +575,7 @@ class Languages {
        /**
         * Get the messages which include unbalanced brackets.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The messages which include unbalanced brackets in this language.
         */
@@ -613,7 +613,7 @@ class Languages {
        /**
         * Get the untranslated namespace names.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The untranslated namespace names in this language.
         */
@@ -631,7 +631,7 @@ class Languages {
        /**
         * Get the project talk namespace names with no $1.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The problematic project talk namespaces in this language.
         */
@@ -660,7 +660,7 @@ class Languages {
        /**
         * Get the untranslated magic words.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The untranslated magic words in this language.
         */
@@ -680,7 +680,7 @@ class Languages {
        /**
         * Get the obsolete magic words.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The obsolete magic words in this language.
         */
@@ -700,7 +700,7 @@ class Languages {
        /**
         * Get the magic words that override the original English magic word.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The overriding magic words in this language.
         */
@@ -730,7 +730,7 @@ class Languages {
        /**
         * Get the magic words which do not match the case-sensitivity of the original words.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The magic words whose case does not match in this language.
         */
@@ -754,7 +754,7 @@ class Languages {
        /**
         * Get the untranslated special page names.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The untranslated special page names in this language.
         */
@@ -774,7 +774,7 @@ class Languages {
        /**
         * Get the obsolete special page names.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         *
         * @return array The obsolete special page names in this language.
         */
@@ -800,7 +800,7 @@ class ExtensionLanguages extends Languages {
 
        /**
         * Load the messages group.
-        * @param $group MessageGroup The messages group.
+        * @param MessageGroup $group The messages group.
         */
        function __construct( MessageGroup $group ) {
                $this->mMessageGroup = $group;
@@ -821,7 +821,7 @@ class ExtensionLanguages extends Languages {
        /**
         * Load the language file.
         *
-        * @param $code string The language code.
+        * @param string $code The language code.
         */
        protected function loadFile( $code ) {
                if ( !isset( $this->mRawMessages[$code] ) ) {
index 6b506b8..ea55a8e 100644 (file)
@@ -29,14 +29,14 @@ require_once 'writeMessagesArray.inc';
 /**
  * Rewrite a messages array.
  *
- * @param $languages
- * @param $code string The language code.
+ * @param Languages $languages
+ * @param string $code The language code.
  * @param bool $write Write to the messages file?
  * @param bool $listUnknown List the unknown messages?
  * @param bool $removeUnknown Remove the unknown messages?
  * @param bool $removeDupes Remove the duplicated messages?
- * @param $dupeMsgSource string The source file intended to remove from the array.
- * @param $messagesFolder String: path to a folder to store the MediaWiki messages.
+ * @param string $dupeMsgSource The source file intended to remove from the array.
+ * @param string $messagesFolder Path to a folder to store the MediaWiki messages.
  */
 function rebuildLanguage( $languages, $code, $write, $listUnknown, $removeUnknown,
        $removeDupes, $dupeMsgSource, $messagesFolder
@@ -59,9 +59,9 @@ function rebuildLanguage( $languages, $code, $write, $listUnknown, $removeUnknow
 /**
  * Remove duplicates from a message array.
  *
- * @param $oldMsgArray array The input message array.
- * @param $dupeMsgSource string The source file path for duplicates.
- * @return Array $newMsgArray The output message array, with duplicates removed.
+ * @param array $oldMsgArray The input message array.
+ * @param string $dupeMsgSource The source file path for duplicates.
+ * @return array The output message array, with duplicates removed.
  */
 function removeDupes( $oldMsgArray, $dupeMsgSource ) {
        if ( file_exists( $dupeMsgSource ) ) {
index 7c880b2..aa2067e 100644 (file)
@@ -37,13 +37,13 @@ class MessageWriter {
        /**
         * Write a messages array as a PHP text and write it to the messages file.
         *
-        * @param $messages Array: the messages array.
-        * @param $code String: the language code.
-        * @param $write Boolean: write to the messages file?
-        * @param $listUnknown Boolean: list the unknown messages?
-        * @param $removeUnknown Boolean: whether to remove unkown messages
-        * @param $messagesFolder String: path to a folder to store the MediaWiki messages.
-        *        Defaults to the current install.
+        * @param array $messages The messages array.
+        * @param string $code The language code.
+        * @param bool $write Write to the messages file?
+        * @param bool $listUnknown List the unknown messages?
+        * @param bool $removeUnknown Whether to remove unkown messages
+        * @param string $messagesFolder Path to a folder to store the MediaWiki messages.
+        *   Defaults to the current install.
         */
        public static function writeMessagesToFile( $messages, $code, $write, $listUnknown,
                $removeUnknown, $messagesFolder = false
@@ -107,14 +107,14 @@ $messages = array(
        /**
         * Write a messages array as a PHP text.
         *
-        * @param $messages Array: the messages array.
-        * @param $ignoredComments Boolean: show comments about ignored and optional
-        *                         messages? (For English.)
-        * @param $prefix String: base path for messages.inc and messageTypes.inc files
-        *                or false for default path (this directory)
-        * @param $removeUnknown Boolean: whether to remove unkown messages
+        * @param array $messages The messages array.
+        * @param bool $ignoredComments Show comments about ignored and optional
+        *   messages? (For English.)
+        * @param string $prefix Base path for messages.inc and messageTypes.inc files
+        *   or false for default path (this directory)
+        * @param bool $removeUnknown Whether to remove unkown messages
         *
-        * @return Array of the PHP text and the sorted messages array.
+        * @return array Array of the PHP text and the sorted messages array.
         */
        public static function writeMessagesArray( $messages, $ignoredComments = false,
                $prefix = false, $removeUnknown = false
@@ -181,9 +181,9 @@ $messages = array(
        /**
         * Generates an array of comments for messages.
         *
-        * @param $messages Array: key of messages.
-        * @param $ignored Array: list of ingored message keys.
-        * @param $optional Array: list of optional message keys.
+        * @param array $messages Key of messages.
+        * @param array $ignored List of ingored message keys.
+        * @param array $optional List of optional message keys.
         * @return array
         */
        public static function makeComments( $messages, $ignored, $optional ) {
@@ -205,10 +205,10 @@ $messages = array(
        /**
         * Write a block of messages to PHP.
         *
-        * @param $blockComment String: the comment of whole block.
-        * @param $messages Array: the block messages.
-        * @param $messageComments Array: optional comments for messages in this block.
-        * @param $prefix String: prefix for every line, for indenting purposes.
+        * @param string $blockComment The comment of whole block.
+        * @param array $messages The block messages.
+        * @param array $messageComments Optional comments for messages in this block.
+        * @param string $prefix Prefix for every line, for indenting purposes.
         *
         * @return string The block, formatted in PHP.
         */
index f698508..5fc972c 100644 (file)
@@ -72,8 +72,8 @@ class NamespaceConflictChecker extends Maintenance {
 
        /**
         * @todo Document
-        * @param $fix Boolean: whether or not to fix broken entries
-        * @param $suffix String: suffix to append to renamed articles
+        * @param bool $fix Whether or not to fix broken entries
+        * @param string $suffix Suffix to append to renamed articles
         *
         * @return bool
         */
@@ -144,7 +144,7 @@ class NamespaceConflictChecker extends Maintenance {
        /**
         * Get the interwiki list
         *
-        * @return Array
+        * @return array
         */
        private function getInterwikiList() {
                $result = Interwiki::getAllPrefixes();
@@ -157,10 +157,10 @@ class NamespaceConflictChecker extends Maintenance {
 
        /**
         * @todo Document
-        * @param $ns Integer: a namespace id
-        * @param $name String
-        * @param $fix Boolean: whether to fix broken entries
-        * @param $suffix String: suffix to append to renamed articles
+        * @param int $ns A namespace id
+        * @param string $name
+        * @param bool $fix Whether to fix broken entries
+        * @param string $suffix Suffix to append to renamed articles
         * @return bool
         */
        private function checkNamespace( $ns, $name, $fix, $suffix = '' ) {
@@ -183,10 +183,10 @@ class NamespaceConflictChecker extends Maintenance {
 
        /**
         * @todo Do this for real
-        * @param $key
-        * @param $prefix
-        * @param $fix
-        * @param $suffix string
+        * @param int $ns
+        * @param string $name
+        * @param bool $fix
+        * @param string $suffix
         * @return bool
         */
        private function checkPrefix( $key, $prefix, $fix, $suffix = '' ) {
@@ -198,8 +198,8 @@ class NamespaceConflictChecker extends Maintenance {
         * Find pages in mainspace that have a prefix of the new namespace
         * so we know titles that will need migrating
         *
-        * @param $ns Integer: namespace id (id for new namespace?)
-        * @param $name String: prefix that is being made a namespace
+        * @param int $ns Namespace id (id for new namespace?)
+        * @param string $name Prefix that is being made a namespace
         *
         * @return array
         */
@@ -237,6 +237,8 @@ class NamespaceConflictChecker extends Maintenance {
        /**
         * Report any conflicts we find
         *
+        * @param stdClass $row
+        * @param string $suffix
         * @return bool
         */
        private function reportConflict( $row, $suffix ) {
@@ -272,9 +274,9 @@ class NamespaceConflictChecker extends Maintenance {
        /**
         * Resolve any conflicts
         *
-        * @param $row Object: row from the page table to fix
-        * @param $resolvable Boolean
-        * @param $suffix String: suffix to append to the fixed page
+        * @param stClass $row Row from the page table to fix
+        * @param bool $resolvable
+        * @param string $suffix Suffix to append to the fixed page
         * @return bool
         */
        private function resolveConflict( $row, $resolvable, $suffix ) {
@@ -304,9 +306,9 @@ class NamespaceConflictChecker extends Maintenance {
        /**
         * Resolve a given conflict
         *
-        * @param $row Object: row from the old broken entry
-        * @param $table String: table to update
-        * @param $prefix String: prefix for column name, like page or ar
+        * @param stdClass $row Row from the old broken entry
+        * @param string $table Table to update
+        * @param string $prefix Prefix for column name, like page or ar
         * @return bool
         */
        private function resolveConflictOn( $row, $table, $prefix ) {
index 9b4d194..21d9104 100644 (file)
@@ -89,7 +89,7 @@ class NextJobDB extends Maintenance {
 
        /**
         * Do all ready periodic jobs for all databases every 5 minutes (and .1% of the time)
-        * @return integer
+        * @return int
         */
        private function executeReadyPeriodicTasks() {
                global $wgLocalDatabases, $wgMemc;
index b0f91a0..044003e 100644 (file)
@@ -55,8 +55,8 @@ class Orphans extends Maintenance {
 
        /**
         * Lock the appropriate tables for the script
-        * @param $db DatabaseBase object
-        * @param $extraTable String The name of any extra tables to lock (eg: text)
+        * @param DatabaseBase $db
+        * @param string $extraTable The name of any extra tables to lock (eg: text)
         */
        private function lockTables( $db, $extraTable = array() ) {
                $tbls = array( 'page', 'revision', 'redirect' );
@@ -68,7 +68,7 @@ class Orphans extends Maintenance {
 
        /**
         * Check for orphan revisions
-        * @param $fix bool Whether to fix broken revisions when found
+        * @param bool $fix Whether to fix broken revisions when found
         */
        private function checkOrphans( $fix ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -117,7 +117,7 @@ class Orphans extends Maintenance {
        }
 
        /**
-        * @param $fix bool
+        * @param bool $fix
         * @todo DON'T USE THIS YET! It will remove entries which have children,
         *       but which aren't properly attached (eg if page_latest is bogus
         *       but valid revisions do exist)
@@ -165,7 +165,7 @@ class Orphans extends Maintenance {
 
        /**
         * Check for pages where page_latest is wrong
-        * @param $fix bool Whether to fix broken entries
+        * @param bool $fix Whether to fix broken entries
         */
        private function checkSeparation( $fix ) {
                $dbw = wfGetDB( DB_MASTER );
index 042790f..d5e40e4 100644 (file)
@@ -114,7 +114,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance {
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @param string $table
         * @param string $idCol
         * @param string $prefix
index 89bfb85..9bb510f 100644 (file)
@@ -66,10 +66,10 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
        }
 
        /**
-        * @param $table string
-        * @param $idCol
-        * @param $prefix string
-        * @return Integer Rows changed
+        * @param string $table
+        * @param string $idCol
+        * @param string $prefix
+        * @return int Rows changed
         */
        protected function doSha1Updates( $table, $idCol, $prefix ) {
                $db = $this->getDB( DB_MASTER );
@@ -134,10 +134,10 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
        }
 
        /**
-        * @param $row
-        * @param $table
-        * @param $idCol
-        * @param $prefix
+        * @param stdClass $row
+        * @param string $table
+        * @param string $idCol
+        * @param string $prefix
         * @return bool
         */
        protected function upgradeRow( $row, $table, $idCol, $prefix ) {
@@ -166,7 +166,7 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
        }
 
        /**
-        * @param $row
+        * @param stdClass $row
         * @return bool
         */
        protected function upgradeLegacyArchiveRow( $row ) {
index 683de45..25ef1a7 100644 (file)
@@ -75,7 +75,7 @@ class PreprocessDump extends DumpIterator {
 
        /**
         * Callback function for each revision, preprocessToObj()
-        * @param $rev Revision
+        * @param Revision $rev
         */
        public function processRevision( $rev ) {
                $content = $rev->getContent( Revision::RAW );
index 563ea45..53aeb09 100644 (file)
@@ -155,7 +155,7 @@ class PPFuzzTest {
        }
 
        /**
-        * @param $title Title
+        * @param Title $title
         */
        function templateHook( $title ) {
                $titleText = $title->getPrefixedDBkey();
index 01bd09a..455e9c0 100644 (file)
@@ -75,8 +75,8 @@ class PruneFileCache extends Maintenance {
        }
 
        /**
-        * @param $dir string
-        * @param $report string|bool Use 'report' to report the directories being scanned
+        * @param string $dir
+        * @param string|bool $report Use 'report' to report the directories being scanned
         */
        protected function prune_directory( $dir, $report = false ) {
                $tsNow = time();
index 85a125f..8a3818a 100644 (file)
@@ -82,6 +82,8 @@ class PurgeList extends Maintenance {
 
        /**
         * Purge a namespace or all pages
+        *
+        * @param int|bool $namespace
         */
        private function purgeNamespace( $namespace = false ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -118,7 +120,7 @@ class PurgeList extends Maintenance {
 
        /**
         * Helper to purge an array of $urls
-        * @param $urls array List of URLS to purge from squids
+        * @param array $urls List of URLS to purge from squids
         */
        private function sendPurgeRequest( $urls ) {
                if ( $this->hasOption( 'delay' ) ) {
index ee3f709..89237a5 100644 (file)
@@ -67,11 +67,11 @@ class ReassignEdits extends Maintenance {
        /**
         * Reassign edits from one user to another
         *
-        * @param $from User to take edits from
-        * @param $to User to assign edits to
-        * @param $rc bool Update the recent changes table
-        * @param $report bool Don't change things; just echo numbers
-        * @return integer Number of entries changed, or that would be changed
+        * @param User $from User to take edits from
+        * @param User $to User to assign edits to
+        * @param bool $rc Update the recent changes table
+        * @param bool $report Don't change things; just echo numbers
+        * @return int Number of entries changed, or that would be changed
         */
        private function doReassignEdits( &$from, &$to, $rc = false, $report = false ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -132,9 +132,9 @@ class ReassignEdits extends Maintenance {
         * Return the most efficient set of user conditions
         * i.e. a user => id mapping, or a user_text => text mapping
         *
-        * @param $user User for the condition
-        * @param $idfield string Field name containing the identifier
-        * @param $utfield string Field name containing the user text
+        * @param User $user User for the condition
+        * @param string $idfield Field name containing the identifier
+        * @param string $utfield Field name containing the user text
         * @return array
         */
        private function userConditions( &$user, $idfield, $utfield ) {
@@ -145,9 +145,9 @@ class ReassignEdits extends Maintenance {
         * Return user specifications
         * i.e. user => id, user_text => text
         *
-        * @param $user User for the spec
-        * @param $idfield string Field name containing the identifier
-        * @param $utfield string Field name containing the user text
+        * @param User $user User for the spec
+        * @param string $idfield Field name containing the identifier
+        * @param string $utfield Field name containing the user text
         * @return array
         */
        private function userSpecification( &$user, $idfield, $utfield ) {
@@ -157,7 +157,7 @@ class ReassignEdits extends Maintenance {
        /**
         * Initialise the user object
         *
-        * @param $username string Username or IP address
+        * @param string $username Username or IP address
         * @return User
         */
        private function initialiseUser( $username ) {
index 5833f8c..cfcb950 100644 (file)
@@ -148,9 +148,9 @@ class RebuildLocalisationCache extends Maintenance {
        /**
         * Helper function to rebuild list of languages codes. Prints the code
         * for each language which is rebuilt.
-        * @param $codes array List of language codes to rebuild.
-        * @param $lc LocalisationCache Instance of LocalisationCacheBulkLoad (?)
-        * @param $force bool Rebuild up-to-date languages
+        * @param array $codes  List of language codes to rebuild.
+        * @param LocalisationCache $lc Instance of LocalisationCacheBulkLoad (?)
+        * @param bool $force Rebuild up-to-date languages
         * @return int Number of rebuilt languages
         */
        private function doRebuild( $codes, $lc, $force ) {
index 2b6680d..ae8d508 100644 (file)
@@ -162,7 +162,7 @@ class RefreshImageMetadata extends Maintenance {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return array
         */
        function getConditions( $dbw ) {
@@ -189,8 +189,8 @@ class RefreshImageMetadata extends Maintenance {
        }
 
        /**
-        * @param $force bool
-        * @param $brokenOnly bool
+        * @param bool $force
+        * @param bool $brokenOnly
         */
        function setupParameters( $force, $brokenOnly ) {
                global $wgUpdateCompatibleMetadata;
index 98ea930..eca207a 100644 (file)
@@ -57,12 +57,12 @@ class RefreshLinks extends Maintenance {
 
        /**
         * Do the actual link refreshing.
-        * @param $start int Page_id to start from
-        * @param $newOnly bool Only do pages with 1 edit
-        * @param $maxLag int Max DB replication lag
-        * @param $end int Page_id to stop at
-        * @param $redirectsOnly bool Only fix redirects
-        * @param $oldRedirectsOnly bool Only fix redirects without redirect entries
+        * @param int $start Page_id to start from
+        * @param bool $newOnly Only do pages with 1 edit
+        * @param int $maxLag Max DB replication lag
+        * @param int $end Page_id to stop at
+        * @param bool $redirectsOnly Only fix redirects
+        * @param bool $oldRedirectsOnly Only fix redirects without redirect entries
         */
        private function doRefreshLinks( $start, $newOnly = false, $maxLag = false,
                                                $end = 0, $redirectsOnly = false, $oldRedirectsOnly = false ) {
@@ -185,7 +185,7 @@ class RefreshLinks extends Maintenance {
         * entry in the "redirect" table points to the correct page and not to an
         * invalid one.
         *
-        * @param $id int The page ID to check
+        * @param int $id The page ID to check
         */
        private function fixRedirect( $id ) {
                $page = WikiPage::newFromID( $id );
@@ -222,7 +222,7 @@ class RefreshLinks extends Maintenance {
 
        /**
         * Run LinksUpdate for all links on a given page_id
-        * @param $id int The page_id
+        * @param int $id The page_id
         */
        public static function fixLinksFromArticle( $id ) {
                $page = WikiPage::newFromID( $id );
@@ -251,8 +251,8 @@ class RefreshLinks extends Maintenance {
         * Removes non-existing links from pages from pagelinks, imagelinks,
         * categorylinks, templatelinks, externallinks, interwikilinks, langlinks and redirect tables.
         *
-        * @param $maxLag int
-        * @param $batchSize int The size of deletion batches
+        * @param int $maxLag
+        * @param int $batchSize The size of deletion batches
         *
         * @author Merlijn van Deen <valhallasw@arctus.nl>
         */
index 16cb17a..4ceab4f 100644 (file)
@@ -96,8 +96,8 @@ class RemoveUnusedAccounts extends Maintenance {
         * Could the specified user account be deemed inactive?
         * (No edits, no deleted edits, no log entries, no current/old uploads)
         *
-        * @param $id User's ID
-        * @param $master bool Perform checking on the master
+        * @param int $id User's ID
+        * @param bool $master Perform checking on the master
         * @return bool
         */
        private function isInactiveAccount( $id, $master = false ) {
index eab5fe7..b76d9a1 100644 (file)
@@ -78,7 +78,7 @@ class DumpRenderer extends Maintenance {
 
        /**
         * Callback function for each revision, turn into HTML and save
-        * @param $rev Revision
+        * @param Revision $rev
         */
        public function handleRevision( $rev ) {
                $title = $rev->getTitle();
index e5e33c0..1e0e441 100644 (file)
@@ -84,7 +84,7 @@ class RollbackEdits extends Maintenance {
 
        /**
         * Get all pages that should be rolled back for a given user
-        * @param $user String a name to check against rev_user_text
+        * @param string $user A name to check against rev_user_text
         * @return array
         */
        private function getRollbackTitles( $user ) {
index dc9c763..13f526c 100644 (file)
@@ -167,7 +167,7 @@ class RunJobs extends Maintenance {
 
        /**
         * @param Job $job
-        * @return integer Seconds for this runner to avoid doing more jobs of this type
+        * @return int Seconds for this runner to avoid doing more jobs of this type
         * @see $wgJobBackoffThrottling
         */
        private function getBackoffTimeToWait( Job $job ) {
@@ -261,7 +261,7 @@ class RunJobs extends Maintenance {
 
        /**
         * Log the job message
-        * @param $msg String The message to log
+        * @param string $msg The message to log
         */
        private function runJobsLog( $msg ) {
                $this->output( wfTimestamp( TS_DB ) . " $msg\n" );
index 5cad5a7..d43c8dc 100644 (file)
@@ -134,8 +134,8 @@ class MwSql extends Maintenance {
 
        /**
         * Print the results, callback for $db->sourceStream()
-        * @param $res ResultWrapper The results object
-        * @param $db DatabaseBase object
+        * @param ResultWrapper $res The results object
+        * @param DatabaseBase $db object
         */
        public function sqlPrintResult( $res, $db ) {
                if ( !$res ) {
index 08188ca..6520e13 100644 (file)
@@ -40,9 +40,9 @@ class Sqlite {
         * Checks given files for correctness of SQL syntax. MySQL DDL will be converted to
         * SQLite-compatible during processing.
         * Will throw exceptions on SQL errors
-        * @param $files
+        * @param array|string $files
         * @throws MWException
-        * @return mixed true if no error or error string in case of errors
+        * @return string|bool true if no error or error string in case of errors
         */
        public static function checkSqlSyntax( $files ) {
                if ( !Sqlite::isPresent() ) {
index 3b59f1d..e824d8c 100644 (file)
@@ -131,8 +131,8 @@ class CompressOld extends Maintenance {
 
        /**
         * @todo document
-        * @param $row
-        * @param $extdb
+        * @param stdClass $row
+        * @param string $extdb
         * @return bool
         */
        private function compressPage( $row, $extdb ) {
@@ -168,12 +168,12 @@ class CompressOld extends Maintenance {
        }
 
        /**
-        * @param $startId
-        * @param $maxChunkSize
-        * @param $beginDate
-        * @param $endDate
-        * @param $extdb string
-        * @param $maxPageId bool|int
+        * @param int $startId
+        * @param int $maxChunkSize
+        * @param string $beginDate
+        * @param string $endDate
+        * @param string $extdb
+        * @param bool|int $maxPageId
         * @return bool
         */
        private function compressWithConcat( $startId, $maxChunkSize, $beginDate,
index dd86619..ff2a9ef 100644 (file)
@@ -302,8 +302,8 @@ class FixBug20757 extends Maintenance {
        /**
         * This is based on part of HistoryBlobStub::getText().
         * Determine if the text can be retrieved from the row in the normal way.
-        * @param $stub
-        * @param $secondaryRow
+        * @param array $stub
+        * @param stdClass $secondaryRow
         * @return bool
         */
        function isUnbrokenStub( $stub, $secondaryRow ) {
index b266316..27d9cb0 100644 (file)
@@ -449,6 +449,8 @@ class RecompressTracked {
 
        /**
         * Move tracked text in a given page
+        *
+        * @param int $pageId
         */
        function doPage( $pageId ) {
                $title = Title::newFromId( $pageId );
@@ -527,6 +529,9 @@ class RecompressTracked {
         * without data loss.
         *
         * The transaction is kept short to reduce locking.
+        *
+        * @param int $textId
+        * @param string $url
         */
        function moveTextRow( $textId, $url ) {
                if ( $this->copyOnly ) {
@@ -560,6 +565,8 @@ class RecompressTracked {
         *
         * This function completes any moves that only have done bt_new_url. This
         * can happen when the script is interrupted, or when --copy-only is used.
+        *
+        * @param array $conds
         */
        function finishIncompleteMoves( $conds ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -607,7 +614,7 @@ class RecompressTracked {
 
        /**
         * Gets a DB master connection for the given external cluster name
-        * @param $cluster string
+        * @param string $cluster
         * @return DatabaseBase
         */
        function getExtDB( $cluster ) {
@@ -617,6 +624,8 @@ class RecompressTracked {
 
        /**
         * Move an orphan text_id to the new cluster
+        *
+        * @param array $textIds
         */
        function doOrphanList( $textIds ) {
                // Finish incomplete moves
@@ -694,8 +703,8 @@ class CgzCopyTransaction {
        /**
         * Add text.
         * Returns false if it's ready to commit.
-        * @param $text string
-        * @param $textId
+        * @param string $text
+        * @param int $textId
         * @return bool
         */
        function addItem( $text, $textId ) {
index aade17e..c505b14 100644 (file)
@@ -141,12 +141,12 @@ class SyncFileBackend extends Maintenance {
         * Sync $dst backend to $src backend based on the $src logs given after $start.
         * Returns the journal entry ID this advanced to and handled (inclusive).
         *
-        * @param $src FileBackend
-        * @param $dst FileBackend
-        * @param $start integer Starting journal position
-        * @param $end integer Starting journal position
-        * @param $callback Closure Callback to update any position file
-        * @return integer|false Journal entry ID or false if there are none
+        * @param FileBackend $src
+        * @param FileBackend $dst
+        * @param int $start Starting journal position
+        * @param int $end Starting journal position
+        * @param Closure $callback Callback to update any position file
+        * @return int|bool Journal entry ID or false if there are none
         */
        protected function syncBackends(
                FileBackend $src, FileBackend $dst, $start, $end, Closure $callback
@@ -198,9 +198,9 @@ class SyncFileBackend extends Maintenance {
        /**
         * Sync particular files of backend $src to the corresponding $dst backend files
         *
-        * @param $paths Array
-        * @param $src FileBackend
-        * @param $dst FileBackend
+        * @param array $paths
+        * @param FileBackend $src
+        * @param FileBackend $dst
         * @return Status
         */
        protected function syncFileBatch( array $paths, FileBackend $src, FileBackend $dst ) {
@@ -276,8 +276,8 @@ class SyncFileBackend extends Maintenance {
        /**
         * Substitute the backend name of storage paths with that of a given one
         *
-        * @param $paths Array|string List of paths or single string path
-        * @return Array|string
+        * @param array|string $paths List of paths or single string path
+        * @return array|string
         */
        protected function replaceNamePaths( $paths, FileBackend $backend ) {
                return preg_replace(
index c52f07c..d90d069 100644 (file)
@@ -35,8 +35,8 @@ class AnsiTermColorer {
        /**
         * Return ANSI terminal escape code for changing text attribs/color
         *
-        * @param $color String: semicolon-separated list of attribute/color codes
-        * @return String
+        * @param string $color Semicolon-separated list of attribute/color codes
+        * @return string
         */
        public function color( $color ) {
                global $wgCommandLineDarkBg;
@@ -49,7 +49,7 @@ class AnsiTermColorer {
        /**
         * Return ANSI terminal escape code for restoring default text attributes
         *
-        * @return String
+        * @return string
         */
        public function reset() {
                return $this->color( 0 );
index f20b64e..bd3338a 100644 (file)
@@ -46,7 +46,7 @@ class UserDupes {
 
        /**
         * Output some text via the output callback provided
-        * @param $str String Text to print
+        * @param string $str Text to print
         */
        private function out( $str ) {
                call_user_func( $this->outputCallback, $str );
@@ -95,8 +95,8 @@ class UserDupes {
         * not requested. (If doing resolution, edits may be reassigned.)
         * Status information will be echo'd to stdout.
         *
-        * @param $doDelete bool: pass true to actually remove things
-        *                  from the database; false to just check.
+        * @param bool $doDelete Pass true to actually remove things
+        *   from the database; false to just check.
         * @return bool
         */
        function checkDupes( $doDelete = false ) {
@@ -200,8 +200,8 @@ class UserDupes {
         * Examine user records for the given name. Try to see which record
         * will be the one that actually gets used, then check remaining records
         * for edits. If the dupes have no edits, we can safely remove them.
-        * @param $name string
-        * @param $doDelete bool
+        * @param string $name
+        * @param bool $doDelete
         * @access private
         */
        function examine( $name, $doDelete ) {
@@ -249,7 +249,7 @@ class UserDupes {
         * Count the number of edits attributed to this user.
         * Does not currently check log table or other things
         * where it might show up...
-        * @param $userid int
+        * @param int $userid
         * @return int
         * @access private
         */
@@ -262,8 +262,8 @@ class UserDupes {
        }
 
        /**
-        * @param $from int
-        * @param $to int
+        * @param int $from
+        * @param int $to
         * @access private
         */
        function reassignEdits( $from, $to ) {
@@ -277,7 +277,7 @@ class UserDupes {
 
        /**
         * Remove a user account line.
-        * @param $userid int
+        * @param int $userid
         * @access private
         */
        function trimAccount( $userid ) {
index f497f2a..5d11352 100644 (file)
@@ -52,8 +52,8 @@ class UserOptions {
        /**
         * This is used to check options. Only needed on construction
         *
-        * @param $opts array
-        * @param $args array
+        * @param array $opts
+        * @param array $args
         *
         * @return bool
         */
@@ -72,8 +72,8 @@ class UserOptions {
        /**
         * load script options in the object
         *
-        * @param $opts array
-        * @param $args array
+        * @param array $opts
+        * @param array $args
         *
         * @return bool
         */