* @param $lastmod Integer: timestamp of the last item in the recentchanges table
* @param $timekey String: memcached key of the last modification
* @param $key String: memcached key of the content
- * @return feed's content on cache hit or false on cache miss
+ * @return string|bool feed's content on cache hit or false on cache miss
*/
public function loadFromCache( $lastmod, $timekey, $key ) {
global $wgFeedCacheTimeout, $wgOut, $messageMemc;
* This first argument used to be an User object.
*
* @deprecated in 1.18; use newFromContext() instead
- * @param $unused Unused
+ * @param $unused
* @return ChangesList|EnhancedChangesList|OldChangesList derivative
*/
public static function newFromUser( $unused ) {
* -1, 0 or 1 in the style of strcmp().
* @param $target string The target value to find.
*
- * @return The item index of the lower bound, or false if the target value
+ * @return int|bool The item index of the lower bound, or false if the target value
* sorts before all items.
*/
function findLowerBound( $valueCallback, $valueCount, $comparisonCallback, $target ) {
* The $textoverride method can be used by subclasses overriding showContentForm
* to pass back to this method.
*
- * @param $customAttribs An array of html attributes to use in the textarea
+ * @param $customAttribs array of html attributes to use in the textarea
* @param $textoverride String: optional text to override $this->textarea1 with
*/
protected function showTextbox1( $customAttribs = null, $textoverride = null ) {
* Returns an array of html code of the following checkboxes:
* minor and watch
*
- * @param $tabindex Current tabindex
+ * @param $tabindex int Current tabindex
* @param $checked Array of checkbox => bool, where bool indicates the checked
* status of the checkbox
*
* Returns an array of html code of the following buttons:
* save, diff, preview and live
*
- * @param $tabindex Current tabindex
+ * @param $tabindex int Current tabindex
*
* @return array
*/
/**
* Produce the stock "your edit contains spam" page
*
- * @param $match Text which triggered one or more filters
+ * @param $match string Text which triggered one or more filters
* @deprecated since 1.17 Use method spamPageWithContent() instead
*/
static function spamPage( $match = false ) {
/**
* Show "your edit contains spam" page with your diff and text
*
- * @param $match Text which triggered one or more filters
+ * @param $match string|bool Text which triggered one or more filters
*/
public function spamPageWithContent( $match = false ) {
global $wgOut;
*
* @param $data Mixed: value to guess type for
* @exception MWException Unsupported datatype
- * @return Type constant
+ * @return int Type constant
*/
public static function guessType( $data ) {
if ( is_bool( $data ) ) {
* Return a string consisting of callers in the stack. Useful sometimes
* for profiling specific points.
*
- * @param $limit The maximum depth of the stack frame to return, or false for
+ * @param $limit int The maximum depth of the stack frame to return, or false for
* the entire stack.
* @return String
*/
* A wrapper around the PHP function var_export().
* Either print it or add it to the regular output ($wgOut).
*
- * @param $var A PHP variable to dump.
+ * @param $var mixed A PHP variable to dump.
*/
function wfVarDump( $var ) {
global $wgOut;
* Execute a shell command, with time and memory limits mirrored from the PHP
* configuration if supported.
* @param $cmd String Command line, properly escaped for shell.
- * @param &$retval optional, will receive the program's exit code.
+ * @param &$retval null|Mixed optional, will receive the program's exit code.
* (non-zero is usually failure)
* @param $environ Array optional environment variables which should be
* added to the executed command environment.
- * @return collected stdout as a string (trailing newlines stripped)
+ * @return string collected stdout as a string (trailing newlines stripped)
*/
function wfShellExec( $cmd, &$retval = null, $environ = array() ) {
global $IP, $wgMaxShellMemory, $wgMaxShellFileSize, $wgMaxShellTime;
/**
* Get the script URL.
*
- * @return script URL
+ * @return string script URL
*/
function wfGetScriptUrl() {
if( isset( $_SERVER['SCRIPT_NAME'] ) ) {
/**
* Get the text for the submit button, either customised or a default.
- * @return unknown_type
+ * @return
*/
function getSubmitText() {
return $this->mSubmitText
* to the form as a whole, after it's submitted but before it's
* processed.
* @param $data
- * @return unknown_type
+ * @return
*/
function filterDataForSubmit( $data ) {
return $data;
/**
* This REALLY should be protected... but it's public for compatibility
*
- * @param $errno Unused
+ * @param $errno
* @param $errstr String: error message
* @return Boolean: false
*/
/**
* Set the caption (as plain text)
*
- * @param $caption Caption
+ * @param $caption string Caption
*/
function setCaption( $caption ) {
$this->mCaption = htmlspecialchars( $caption );
/**
* Notify the callback function of a revision
- * @param $revision A WikiRevision object
+ * @param $revision |WikiRevision object
+ * @return bool|mixed
*/
private function revisionCallback( $revision ) {
if ( isset( $this->mRevisionCallback ) ) {
/**
* Notify the callback function of a new log item
- * @param $revision A WikiRevision object
+ * @param $revision WikiRevision object
+ * @return bool|mixed
*/
private function logItemCallback( $revision ) {
if ( isset( $this->mLogItemCallback ) ) {
* @param $oldimage
* @param $reason
* @param $suppress bool
- * @return \type|array|Title
+ * @return array|Title
*/
public static function deleteFile( Page $page, User $user, $token, $oldimage, &$reason = null, $suppress = false ) {
$title = $page->getTitle();
* Extracts from a single sql row the data needed to describe one recent change.
*
* @param $row The row from which to extract the data.
- * @return An array mapping strings (descriptors) to their respective string values.
+ * @return array An array mapping strings (descriptors) to their respective string values.
* @access public
*/
public function extractRowInfo( $row ) {
* @param $isFullKey Boolean: specifies whether $key is a two part key
* "msg/lang".
*
- * @return string|false
+ * @return string|bool
*/
function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) {
global $wgLanguageCode, $wgContLang;
* - false to disable debugging
* - omitted or null to do nothing
*
- * @return The previous value of the flag
+ * @return bool|null previous value of the flag
*/
function debug( $debug = null ) {
return wfSetBit( $this->mFlags, DBO_DEBUG, $debug );
*
* @param $buffer null|bool
*
- * @return The previous value of the flag
+ * @return null|bool The previous value of the flag
*/
function bufferResults( $buffer = null ) {
if ( is_null( $buffer ) ) {
* Historically, transactions were allowed to be "nested". This is no
* longer supported, so this function really only returns a boolean.
*
- * @param $level An integer (0 or 1), or omitted to leave it unchanged.
- * @return The previous value
+ * @param $level int An integer (0 or 1), or omitted to leave it unchanged.
+ * @return int The previous value
*/
function trxLevel( $level = null ) {
return wfSetVar( $this->mTrxLevel, $level );
/**
* Get/set the number of errors logged. Only useful when errors are ignored
- * @param $count The count to set, or omitted to leave it unchanged.
- * @return The error count
+ * @param $count int The count to set, or omitted to leave it unchanged.
+ * @return int The error count
*/
function errorCount( $count = null ) {
return wfSetVar( $this->mErrorCount, $count );
/**
* Get/set the table prefix.
- * @param $prefix The table prefix to set, or omitted to leave it unchanged.
- * @return The previous table prefix.
+ * @param $prefix string The table prefix to set, or omitted to leave it unchanged.
+ * @return string The previous table prefix.
*/
function tablePrefix( $prefix = null ) {
return wfSetVar( $this->mTablePrefix, $prefix );
* @param $options string|array Query options
* @param $join_conds string|array Join conditions
*
- * @return SQL query string.
+ * @return string SQL query string.
* @see DatabaseBase::select()
*/
function selectSQLText( $table, $vars, $conds = '', $fname = 'DatabaseBase::select', $options = array(), $join_conds = array() ) {
* @param $timeout Integer: the maximum number of seconds to wait for
* synchronisation
*
- * @return An integer: zero if the slave was past that position already,
+ * @return integer: zero if the slave was past that position already,
* greater than zero if we waited for some period of time, less than
* zero if we timed out.
*/
/**
* List all tables on the database
*
- * @param $prefix Only show tables with this prefix, e.g. mw_
+ * @param $prefix string Only show tables with this prefix, e.g. mw_
* @param $fname String: calling function name
*/
function listTables( $prefix = null, $fname = 'DatabaseBase::listTables' ) {
* @param $lockName String: Name of lock to release
* @param $method String: Name of method calling us
*
- * @return Returns 1 if the lock was released, 0 if the lock was not established
+ * @return int Returns 1 if the lock was released, 0 if the lock was not established
* by this thread (in which case the lock is not released), and NULL if the named
* lock did not exist
*/
* Fields can be retrieved with $row->fieldname, with fields acting like
* member variables.
*
- * @param $res SQL result object as returned from Database::query(), etc.
+ * @param $res array|ResultWrapper SQL result object as returned from Database::query(), etc.
* @return DB2 row object
* @throws DBUnexpectedError Thrown if the database returns an error
*/
* Fetch the next row from the given result object, in associative array
* form. Fields are retrieved with $row['fieldname'].
*
- * @param $res SQL result object as returned from Database::query(), etc.
- * @return DB2 row object
+ * @param $res array|ResultWrapper SQL result object as returned from Database::query(), etc.
+ * @return ResultWrapper row object
* @throws DBUnexpectedError Thrown if the database returns an error
*/
public function fetchRow( $res ) {
* Doesn't escape numbers
*
* @param $s String: string to escape
- * @return escaped string
+ * @return string escaped string
*/
public function addQuotes( $s ) {
//$this->installPrint( "DB2::addQuotes( $s )\n" );
/**
* Alias for addQuotes()
* @param $s String: string to escape
- * @return escaped string
+ * @return string escaped string
*/
public function strencode( $s ) {
// Bloody useless function
/**
* Generates a timestamp in an insertable format
*
- * @param $ts timestamp
+ * @param $ts string timestamp
* @return String: timestamp value
*/
public function timestamp( $ts = 0 ) {
/**
* Return the next in a sequence, save the value for retrieval via insertId()
* @param $seqName String: name of a defined sequence in the database
- * @return next value in that sequence
+ * @return int next value in that sequence
*/
public function nextSequenceValue( $seqName ) {
// Not using sequences in the primary schema to allow for easier migration
/**
* This must be called after nextSequenceVal
- * @return Last sequence value used as a primary key
+ * @return int Last sequence value used as a primary key
*/
public function insertId() {
return $this->mInsertId;
* UPDATE wrapper, takes a condition array and a SET array
*
* @param $table String: The table to UPDATE
- * @param $values An array of values to SET
- * @param $conds An array of conditions ( WHERE ). Use '*' to update all rows.
+ * @param $values array An array of values to SET
+ * @param $conds array An array of conditions ( WHERE ). Use '*' to update all rows.
* @param $fname String: The Class::Function calling this function
* ( for the log )
- * @param $options An array of UPDATE options, can be one or
+ * @param $options array An array of UPDATE options, can be one or
* more of IGNORE, LOW_PRIORITY
* @return Boolean
*/
* Moves the row pointer of the result set
* @param $res Object: result set
* @param $row Integer: row number
- * @return success or failure
+ * @return bool success or failure
*/
public function dataSeek( $res, $row ) {
if ( $res instanceof ResultWrapper ) {
* Verifies that an index was created as unique
* @param $table String: table name
* @param $index String: index name
- * @param $fname function name for profiling
+ * @param $fname string function name for profiling
* @return Bool
*/
public function indexUnique ( $table, $index,
/**
* List all tables on the database
*
- * @param $prefix Only show tables with this prefix, e.g. mw_
+ * @param $prefix string Only show tables with this prefix, e.g. mw_
* @param $fname String: calling function name
* @return array
*/
/**
* List all tables on the database
*
- * @param $prefix Only show tables with this prefix, e.g. mw_
+ * @param $prefix string Only show tables with this prefix, e.g. mw_
* @param $fname String: calling function name
*
* @return array
*
* $diff = new Diff($lines1, $lines2);
* $rev = $diff->reverse();
- * @return object A Diff object representing the inverse of the
+ * @return object object A Diff object representing the inverse of the
* original diff.
*/
function reverse() {
/**
* Find many files at once.
*
- * @param $items An array of titles, or an array of findFile() options with
+ * @param $items array An array of titles, or an array of findFile() options with
* the "title" option giving the title. Example:
*
* $findItem = array( 'title' => $title, 'private' => true );
/**
* Checks existence of a a file
*
- * @param $file Virtual URL (or storage path) of file to check
+ * @param $file string Virtual URL (or storage path) of file to check
* @param $flags Integer: bitwise combination of the following flags:
* self::FILES_ONLY Mark file as existing only if it is a file (not directory)
* @return bool
* @param $files Array: Virtual URLs (or storage paths) of files to check
* @param $flags Integer: bitwise combination of the following flags:
* self::FILES_ONLY Mark file as existing only if it is a file (not directory)
- * @return Either array of files and existence flags, or false
+ * @return array|bool Either array of files and existence flags, or false
*/
public function fileExistsBatch( $files, $flags = 0 ) {
$result = array();
* Returns false if the file does not exist.
*
* @param $hash String base 36 SHA-1 hash
- * @param $options Option array, same as findFile()
+ * @param $options array Option array, same as findFile()
* @return File object or false if it is not found
*/
function findFileFromKey( $hash, $options = array() ) {
/**
* Split a virtual URL into repo, zone and rel parts
- * @return an array containing repo, zone and rel
+ * @param $url string
+ * @return array containing repo, zone and rel
*/
function splitVirtualUrl( $url ) {
if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {
*
* STUB
* @param $limit integer Limit of rows to return
- * @param $start timestamp Only revisions older than $start will be returned
- * @param $end timestamp Only revisions newer than $end will be returned
+ * @param $start string timestamp Only revisions older than $start will be returned
+ * @param $end string timestamp Only revisions newer than $end will be returned
* @param $inc bool Include the endpoints of the time range
*
* @return array
*
* @param $suffix bool|string if not false, the name of a thumbnail file
*
- * @return path
+ * @return string path
*/
function getThumbUrl( $suffix = false ) {
$this->assertRepoDefined();
*
* May throw database exceptions on error.
*
- * @param $versions set of record ids of deleted items to restore,
+ * @param $versions array set of record ids of deleted items to restore,
* or empty to restore all revisions.
* @param $unsuppress Boolean
* @return FileRepoStatus
}
/**
- * @return Staus
+ * @return Status
*/
public function createTables() {
$status = parent::createTables();
/**
* Initiate an upgrade of the existing database
- * @param $vars Variables from LocalSettings.php and AdminSettings.php
+ * @param $vars array Variables from LocalSettings.php and AdminSettings.php
* @return Status
*/
protected function handleExistingUpgrade( $vars ) {
* @param $css String: stylesheet to transform
* @param $swapLtrRtlInURL Boolean: If true, swap 'ltr' and 'rtl' in URLs
* @param $swapLeftRightInURL Boolean: If true, swap 'left' and 'right' in URLs
- * @return Transformed stylesheet
+ * @return string Transformed stylesheet
*/
public static function transform( $css, $swapLtrRtlInURL = false, $swapLeftRightInURL = false ) {
// We wrap tokens in ` , not ~ like the original implementation does.
* a potentially harmful file extension.
*
* @param $urlPart string The right-hand portion of a URL
- * @param $extWhitelist An array of file extensions which may occur in this
+ * @param $extWhitelist array An array of file extensions which may occur in this
* URL, and which should be allowed.
* @return bool
*/