From e78776373e14c8dc208b0045bf83a44e671d6f00 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Thu, 17 Apr 2014 22:48:32 +0200 Subject: [PATCH] Fixed some @params documentation (maintenance) 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 --- maintenance/Maintenance.php | 122 +++++++++--------- maintenance/backup.inc | 25 ++-- maintenance/backupPrefetch.inc | 12 +- maintenance/backupTextPass.inc | 4 +- .../benchmarks/bench_delete_truncate.php | 6 +- maintenance/benchmarks/benchmarkHooks.php | 2 +- maintenance/benchmarks/benchmarkPurge.php | 6 +- maintenance/checkSyntax.php | 24 ++-- maintenance/cleanupImages.php | 2 +- maintenance/compareParsers.php | 2 +- maintenance/convertUserOptions.php | 4 +- maintenance/copyFileBackend.php | 2 +- maintenance/deleteArchivedRevisions.inc | 2 +- maintenance/deleteOrphanedRevisions.php | 4 +- maintenance/dumpIterator.php | 4 +- maintenance/dumpUploads.php | 4 +- maintenance/fetchText.php | 6 +- maintenance/findHooks.php | 24 ++-- maintenance/fixSlaveDesync.php | 2 +- maintenance/generateJsonI18n.php | 2 +- maintenance/generateSitemap.php | 51 +++++--- maintenance/importDump.php | 7 +- maintenance/importImages.inc | 18 +-- maintenance/language/checkLanguage.inc | 18 +-- maintenance/language/languages.inc | 60 ++++----- maintenance/language/rebuildLanguage.php | 14 +- maintenance/language/writeMessagesArray.inc | 42 +++--- maintenance/namespaceDupes.php | 40 +++--- maintenance/nextJobDB.php | 2 +- maintenance/orphans.php | 10 +- maintenance/populateRevisionLength.php | 2 +- maintenance/populateRevisionSha1.php | 18 +-- maintenance/preprocessDump.php | 2 +- maintenance/preprocessorFuzzTest.php | 2 +- maintenance/pruneFileCache.php | 4 +- maintenance/purgeList.php | 4 +- maintenance/reassignEdits.php | 24 ++-- maintenance/rebuildLocalisationCache.php | 6 +- maintenance/refreshImageMetadata.php | 6 +- maintenance/refreshLinks.php | 20 +-- maintenance/removeUnusedAccounts.php | 4 +- maintenance/renderDump.php | 2 +- maintenance/rollbackEdits.php | 2 +- maintenance/runJobs.php | 4 +- maintenance/sql.php | 4 +- maintenance/sqlite.inc | 4 +- maintenance/storage/compressOld.php | 16 +-- maintenance/storage/fixBug20757.php | 4 +- maintenance/storage/recompressTracked.php | 15 ++- maintenance/syncFileBackend.php | 22 ++-- maintenance/term/MWTerm.php | 6 +- maintenance/userDupes.inc | 18 +-- maintenance/userOptions.inc | 8 +- 53 files changed, 368 insertions(+), 350 deletions(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index d9ef350414..5c05b1efb8 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -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 */ 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(); } diff --git a/maintenance/backup.inc b/maintenance/backup.inc index 7161b04dfc..323a870e68 100644 --- a/maintenance/backup.inc +++ b/maintenance/backup.inc @@ -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; diff --git a/maintenance/backupPrefetch.inc b/maintenance/backupPrefetch.inc index a0ff7fe17f..6d41c18d83 100644 --- a/maintenance/backupPrefetch.inc +++ b/maintenance/backupPrefetch.inc @@ -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() { diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc index 24e7634dbd..d210c3a363 100644 --- a/maintenance/backupTextPass.inc +++ b/maintenance/backupTextPass.inc @@ -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 */ diff --git a/maintenance/benchmarks/bench_delete_truncate.php b/maintenance/benchmarks/bench_delete_truncate.php index 9f11c63c31..ea22b6d068 100644 --- a/maintenance/benchmarks/bench_delete_truncate.php +++ b/maintenance/benchmarks/bench_delete_truncate.php @@ -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 ) { diff --git a/maintenance/benchmarks/benchmarkHooks.php b/maintenance/benchmarks/benchmarkHooks.php index 3f5d6db0d9..59d3bdf77b 100644 --- a/maintenance/benchmarks/benchmarkHooks.php +++ b/maintenance/benchmarks/benchmarkHooks.php @@ -61,7 +61,7 @@ class BenchmarkHooks extends Benchmarker { } /** - * @param $trials int + * @param int $trials * @return string */ private function benchHooks( $trials = 10 ) { diff --git a/maintenance/benchmarks/benchmarkPurge.php b/maintenance/benchmarks/benchmarkPurge.php index fd863d52e2..17973582d8 100644 --- a/maintenance/benchmarks/benchmarkPurge.php +++ b/maintenance/benchmarks/benchmarkPurge.php @@ -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 ) { diff --git a/maintenance/checkSyntax.php b/maintenance/checkSyntax.php index 297c9723ba..ef8854558e 100644 --- a/maintenance/checkSyntax.php +++ b/maintenance/checkSyntax.php @@ -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 ) { diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php index d42497d362..01ed9caf9c 100644 --- a/maintenance/cleanupImages.php +++ b/maintenance/cleanupImages.php @@ -96,7 +96,7 @@ class ImageCleanup extends TableCleanup { } /** - * @param $name string + * @param string $name */ private function killRow( $name ) { if ( $this->dryrun ) { diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index 723a6bf733..f33ff40d41 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -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(); diff --git a/maintenance/convertUserOptions.php b/maintenance/convertUserOptions.php index 34c643bbaa..24be2b453a 100644 --- a/maintenance/convertUserOptions.php +++ b/maintenance/convertUserOptions.php @@ -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 ) { diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 8bacb264ed..86e47af9be 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -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() { diff --git a/maintenance/deleteArchivedRevisions.inc b/maintenance/deleteArchivedRevisions.inc index dd8e3dd473..62465abdfc 100644 --- a/maintenance/deleteArchivedRevisions.inc +++ b/maintenance/deleteArchivedRevisions.inc @@ -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. diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index f0a9692805..9922a1d0d4 100644 --- a/maintenance/deleteOrphanedRevisions.php +++ b/maintenance/deleteOrphanedRevisions.php @@ -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 ) ) { diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index c6b39587be..cf3523e61b 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -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() ) ) { diff --git a/maintenance/dumpUploads.php b/maintenance/dumpUploads.php index 0ec1955444..d6c70f8e8f 100644 --- a/maintenance/dumpUploads.php +++ b/maintenance/dumpUploads.php @@ -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 ); diff --git a/maintenance/fetchText.php b/maintenance/fetchText.php index 05470d307f..df5a2085f6 100644 --- a/maintenance/fetchText.php +++ b/maintenance/fetchText.php @@ -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 ); diff --git a/maintenance/findHooks.php b/maintenance/findHooks.php index 6d7de091c8..82c5b95647 100644 --- a/maintenance/findHooks.php +++ b/maintenance/findHooks.php @@ -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 ) { diff --git a/maintenance/fixSlaveDesync.php b/maintenance/fixSlaveDesync.php index e4e557fe53..a09a7421bb 100644 --- a/maintenance/fixSlaveDesync.php +++ b/maintenance/fixSlaveDesync.php @@ -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 diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index 8dc89ed518..23c134b621 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -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; diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index ab28c8bdc5..959cc8fd58 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -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() . '' . "\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 "\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() . '' . "\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 "\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 diff --git a/maintenance/importDump.php b/maintenance/importDump.php index cec6a0eab0..61189b7072 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -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 ) { diff --git a/maintenance/importImages.inc b/maintenance/importImages.inc index 5ae6d6bec8..ae93287df1 100644 --- a/maintenance/importImages.inc +++ b/maintenance/importImages.inc @@ -26,10 +26,10 @@ /** * 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 ) { diff --git a/maintenance/language/checkLanguage.inc b/maintenance/language/checkLanguage.inc index ac70ead221..990f258534 100644 --- a/maintenance/language/checkLanguage.inc +++ b/maintenance/language/checkLanguage.inc @@ -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 ) { diff --git a/maintenance/language/languages.inc b/maintenance/language/languages.inc index 0483aea714..fa7e11c40c 100644 --- a/maintenance/language/languages.inc +++ b/maintenance/language/languages.inc @@ -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] ) ) { diff --git a/maintenance/language/rebuildLanguage.php b/maintenance/language/rebuildLanguage.php index 6b506b804d..ea55a8e9e9 100644 --- a/maintenance/language/rebuildLanguage.php +++ b/maintenance/language/rebuildLanguage.php @@ -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 ) ) { diff --git a/maintenance/language/writeMessagesArray.inc b/maintenance/language/writeMessagesArray.inc index 7c880b2f9f..aa2067e4ab 100644 --- a/maintenance/language/writeMessagesArray.inc +++ b/maintenance/language/writeMessagesArray.inc @@ -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. */ diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index f69850823d..5fc972c3a7 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -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 ) { diff --git a/maintenance/nextJobDB.php b/maintenance/nextJobDB.php index 9b4d194385..21d9104213 100644 --- a/maintenance/nextJobDB.php +++ b/maintenance/nextJobDB.php @@ -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; diff --git a/maintenance/orphans.php b/maintenance/orphans.php index b0f91a05bc..044003e735 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -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 ); diff --git a/maintenance/populateRevisionLength.php b/maintenance/populateRevisionLength.php index 042790fc76..d5e40e4843 100644 --- a/maintenance/populateRevisionLength.php +++ b/maintenance/populateRevisionLength.php @@ -114,7 +114,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance { } /** - * @param $row + * @param stdClass $row * @param string $table * @param string $idCol * @param string $prefix diff --git a/maintenance/populateRevisionSha1.php b/maintenance/populateRevisionSha1.php index 89bfb85b4e..9bb510f956 100644 --- a/maintenance/populateRevisionSha1.php +++ b/maintenance/populateRevisionSha1.php @@ -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 ) { diff --git a/maintenance/preprocessDump.php b/maintenance/preprocessDump.php index 683de45802..25ef1a776e 100644 --- a/maintenance/preprocessDump.php +++ b/maintenance/preprocessDump.php @@ -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 ); diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 563ea4598b..53aeb09b67 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -155,7 +155,7 @@ class PPFuzzTest { } /** - * @param $title Title + * @param Title $title */ function templateHook( $title ) { $titleText = $title->getPrefixedDBkey(); diff --git a/maintenance/pruneFileCache.php b/maintenance/pruneFileCache.php index 01bd09a244..455e9c07c9 100644 --- a/maintenance/pruneFileCache.php +++ b/maintenance/pruneFileCache.php @@ -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(); diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index 85a125f622..8a3818adeb 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -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' ) ) { diff --git a/maintenance/reassignEdits.php b/maintenance/reassignEdits.php index ee3f70935a..89237a5fae 100644 --- a/maintenance/reassignEdits.php +++ b/maintenance/reassignEdits.php @@ -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 ) { diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index 5833f8cd04..cfcb950574 100644 --- a/maintenance/rebuildLocalisationCache.php +++ b/maintenance/rebuildLocalisationCache.php @@ -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 ) { diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index 2b6680d26f..ae8d5083cb 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -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; diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index 98ea930108..eca207a3d9 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -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 */ diff --git a/maintenance/removeUnusedAccounts.php b/maintenance/removeUnusedAccounts.php index 16cb17ab72..4ceab4feae 100644 --- a/maintenance/removeUnusedAccounts.php +++ b/maintenance/removeUnusedAccounts.php @@ -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 ) { diff --git a/maintenance/renderDump.php b/maintenance/renderDump.php index eab5fe7569..b76d9a12a4 100644 --- a/maintenance/renderDump.php +++ b/maintenance/renderDump.php @@ -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(); diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php index e5e33c02ed..1e0e441eef 100644 --- a/maintenance/rollbackEdits.php +++ b/maintenance/rollbackEdits.php @@ -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 ) { diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index dc9c7632a6..13f526c48b 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -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" ); diff --git a/maintenance/sql.php b/maintenance/sql.php index 5cad5a75d7..d43c8dc040 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -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 ) { diff --git a/maintenance/sqlite.inc b/maintenance/sqlite.inc index 08188cade4..6520e1381c 100644 --- a/maintenance/sqlite.inc +++ b/maintenance/sqlite.inc @@ -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() ) { diff --git a/maintenance/storage/compressOld.php b/maintenance/storage/compressOld.php index 3b59f1dfdb..e824d8c15a 100644 --- a/maintenance/storage/compressOld.php +++ b/maintenance/storage/compressOld.php @@ -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, diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index dd86619e75..ff2a9efc3b 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -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 ) { diff --git a/maintenance/storage/recompressTracked.php b/maintenance/storage/recompressTracked.php index b266316527..27d9cb03d6 100644 --- a/maintenance/storage/recompressTracked.php +++ b/maintenance/storage/recompressTracked.php @@ -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 ) { diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index aade17e63f..c505b1482e 100644 --- a/maintenance/syncFileBackend.php +++ b/maintenance/syncFileBackend.php @@ -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( diff --git a/maintenance/term/MWTerm.php b/maintenance/term/MWTerm.php index c52f07ccdf..d90d06956e 100644 --- a/maintenance/term/MWTerm.php +++ b/maintenance/term/MWTerm.php @@ -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 ); diff --git a/maintenance/userDupes.inc b/maintenance/userDupes.inc index f20b64e2b1..bd3338a937 100644 --- a/maintenance/userDupes.inc +++ b/maintenance/userDupes.inc @@ -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 ) { diff --git a/maintenance/userOptions.inc b/maintenance/userOptions.inc index f497f2aeca..5d113526f2 100644 --- a/maintenance/userOptions.inc +++ b/maintenance/userOptions.inc @@ -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 */ -- 2.20.1