*
* @param int $cnt Maximum list of contributors to show
* @param bool $showIfMax Whether to contributors if there more than $cnt
- * @return string html
+ * @return string Html
*/
public function getCredits( $cnt, $showIfMax = true ) {
wfProfileIn( __METHOD__ );
* Get a list of contributors of $article
* @param int $cnt Maximum list of contributors to show
* @param bool $showIfMax Whether to contributors if there more than $cnt
- * @return string html
+ * @return string Html
*/
protected function getContributors( $cnt, $showIfMax ) {
global $wgHiddenPrefs;
/**
* Output a subscription feed listing recent edits to this page.
*
- * @param string $type feed type
+ * @param string $type Feed type
*/
function feed( $type ) {
global $wgFeedClasses, $wgFeedLimit;
* Borrows Recent Changes' feed generation functions for formatting;
* includes a diff to the previous revision (if any).
*
- * @param stdClass|array $row database row
+ * @param stdClass|array $row Database row
* @return FeedItem
*/
function feedItem( $row ) {
*
* @param Page|WikiPage $page Page or WikiPage object to work on
* @param User $user User doing the action
- * @param string $token delete token (same as edit token)
- * @param string|null $reason reason for the deletion. Autogenerated if null
+ * @param string $token Delete token (same as edit token)
+ * @param string|null $reason Reason for the deletion. Autogenerated if null
* @return Status|array
*/
public static function delete( Page $page, User $user, $token, &$reason = null ) {
* Call this method to initialize output data. See execute()
* @param ApiResult $result
* @param object $feed An instance of one of the $wgFeedClasses classes
- * @param array $feedItems of FeedItem objects
+ * @param array $feedItems Array of FeedItem objects
*/
public static function setResult( $result, $feed, $feedItems ) {
// Store output in the Result data.
/**
* Add all items from $values into the result
- * @param array $result output
- * @param array $values values to add
- * @param string $flag the name of the boolean flag to mark this element
- * @param string $name if given, name of the value
+ * @param array $result Output
+ * @param array $values Values to add
+ * @param string $flag The name of the boolean flag to mark this element
+ * @param string $name If given, name of the value
*/
private static function addValues( array &$result, $values, $flag = null, $name = null ) {
foreach ( $values as $val ) {
/**
* Check POST for external response and setup result printer
* @param ApiBase $module An Api module
- * @param array $params an array with the request parameters
+ * @param array $params An array with the request parameters
*/
protected function setupExternalResponse( $module, $params ) {
if ( !$this->getRequest()->wasPosted() && $module->mustBePosted() ) {
/**
* Get the array mapping module names to class names
* @deprecated since 1.21, use getModuleManager()'s methods instead
- * @return array array(modulename => classname)
+ * @return array Array(modulename => classname)
*/
public function getModules() {
wfDeprecated( __METHOD__, '1.21' );
/**
* Get the generators array mapping module names to class names
* @deprecated since 1.21, list of generators is maintained by ApiPageSet
- * @return array array(modulename => classname)
+ * @return array Array(modulename => classname)
*/
public function getGenerators() {
wfDeprecated( __METHOD__, '1.21' );
*
* If this is >= TRANSFORM_LIMIT, you should probably stop processing images.
*
- * @return int count
+ * @return int Count
*/
static function getTransformCount() {
return self::$transformCount;
* Get an array mapping token names to their handler functions.
* The prototype for a token function is func($pageid, $title, $rc)
* it should return a token or false (permission denied)
- * @return array array(tokenname => function)
+ * @return array Array(tokenname => function)
*/
protected function getTokenFunctions() {
// Don't call the hooks twice
/**
* Sets internal state to include the desired properties in the output.
- * @param array $prop associative array of properties, only keys are used here
+ * @param array $prop Associative array of properties, only keys are used here
*/
public function initProperties( $prop ) {
$this->fld_comment = isset( $prop['comment'] );
/**
* Create a file dependency
*
- * @param string $filename the name of the file, preferably fully qualified
+ * @param string $filename The name of the file, preferably fully qualified
* @param null|bool|int $timestamp The unix last modified timestamp, or false if the
* file does not exist. If omitted, the timestamp will be loaded from
* the file.
/**
* Read a JSON file containing localisation messages.
* @param string $fileName Name of file to read
- * @throws MWException if there is a syntax error in the JSON file
+ * @throws MWException If there is a syntax error in the JSON file
* @return array Array with a 'messages' key, or empty array if the file doesn't exist
*/
public function readJSONFile( $fileName ) {
/** @var DatabaseBase */
private $dbw;
- /** @var Array */
+ /** @var array */
private $batch = array();
private $readOnly = false;
* - If boolean and false, create object from the current users language
* - If boolean and true, create object from the wikis content language
* - If language object, use it as given
- * @param bool $isFullKey specifies whether $key is a two part key "msg/lang".
+ * @param bool $isFullKey Specifies whether $key is a two part key "msg/lang".
*
- * @throws MWException when given an invalid key
+ * @throws MWException When given an invalid key
* @return string|bool False if the message doesn't exist, otherwise the
* message (which can be empty)
*/
/**
* Obtain the recent change with a given rc_id value
*
- * @param int $rcid rc_id value to retrieve
+ * @param int $rcid The rc_id value to retrieve
* @return RecentChange
*/
public static function newFromId( $rcid ) {
* Adjust or reset the connection handle read timeout value
*
* @param Redis $conn
- * @param integer $timeout Optional
+ * @param int $timeout Optional
*/
public function resetTimeout( Redis $conn, $timeout = null ) {
$conn->setOption( Redis::OPT_READ_TIMEOUT, $timeout ?: $this->readTimeout );
* Register a new config factory function
* Will override if it's already registered
* @param string $name
- * @param callable $callback that takes this ConfigFactory as an argument
- * @throws InvalidArgumentException if an invalid callback is provided
+ * @param callable $callback That takes this ConfigFactory as an argument
+ * @throws InvalidArgumentException If an invalid callback is provided
*/
public function register( $name, $callback ) {
if ( !is_callable( $callback ) ) {
/**
* Create a given Config using the registered callback for $name.
* If an object was already created, the same Config object is returned.
- * @param string $name of the extension/component you want a Config object for
+ * @param string $name Name of the extension/component you want a Config object for
* 'main' is used for core
- * @throws ConfigException if a factory function isn't registered for $name
- * @throws UnexpectedValueException if the factory function returns a non-Config object
+ * @throws ConfigException If a factory function isn't registered for $name
+ * @throws UnexpectedValueException If the factory function returns a non-Config object
* @return Config
*/
public function makeConfig( $name ) {
*
* @param string $prefix Prefix to use on the variable
* @param string $name Variable name without prefix
- * @param mixed $value value to set
+ * @param mixed $value Value to set
*/
protected function setWithPrefix( $prefix, $name, $value ) {
$GLOBALS[$prefix . $name] = $value;
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageViewLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageLanguage()
*/
* @param Title $title
* @param Content $content
*
- * @return Language wfGetLangObj( 'en' )
+ * @return Language Return of wfGetLangObj( 'en' )
*
* @see ContentHandler::getPageViewLanguage()
*/
}
/**
- * @return Content. A copy of this object
+ * @return Content A copy of this object
*
* @see Content::copy
*/
* @param int $revId Revision to pass to the parser (default: null)
* @param ParserOptions $options (default: null)
* @param bool $generateHtml (default: true)
- * @param &$output ParserOutput representing the HTML form of the text,
+ * @param ParserOutput &$output ParserOutput representing the HTML form of the text,
* may be manipulated or replaced.
*/
protected function fillParserOutput( Title $title, $revId,
* it would set only the original context, and not take
* into account any changes.
*
- * @param String Message name
- * @param Variable number of message arguments
+ * @param mixed $args,... Arguments to wfMessage
* @return Message
*/
public function msg() {
* DatabaseBase::tableName().
* @param array $a Array of rows to insert
* @param string $fname Calling function name (use __METHOD__) for logs/profiling
- * @param array $options of options
+ * @param array $options Array of options
*
* @return bool
*/
* Build a partial where clause from a 2-d array such as used for LinkBatch.
* The keys on each level may be either integers or strings.
*
- * @param array $data organized as 2-d
+ * @param array $data Organized as 2-d
* array(baseKeyVal => array(subKeyVal => [ignored], ...), ...)
* @param string $baseKey Field name to match the base-level keys to (eg 'pl_namespace')
* @param string $subKey Field name to match the sub-level keys to (eg 'pl_title')
- * @return string|bool string SQL fragment, or false if no items in array.
+ * @return string|bool SQL fragment, or false if no items in array
*/
public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
$conds = array();
/**
* Gets an array of aliased table names
*
- * @param array $tables array( [alias] => table )
+ * @param array $tables Array( [alias] => table )
* @return string[] See tableNameWithAlias()
*/
public function tableNamesWithAlias( $tables ) {
/**
* Gets an array of aliased field names
*
- * @param array $fields array( [alias] => field )
+ * @param array $fields Array( [alias] => field )
* @return string[] See fieldNameWithAlias()
*/
public function fieldNamesWithAlias( $fields ) {
* DELETE query wrapper.
*
* @param array $table Table name
- * @param string|array $conds of conditions. See $conds in DatabaseBase::select()
+ * @param string|array $conds Array of conditions. See $conds in DatabaseBase::select()
* for the format. Use $conds == "*" to delete all rows
- * @param string $fname name of the calling function
+ * @param string $fname Name of the calling function
* @throws DBUnexpectedError
* @return bool|ResultWrapper
*/
/**
* Encode an expiry time into the DBMS dependent format
*
- * @param string $expiry timestamp for expiry, or the 'infinity' string
+ * @param string $expiry Timestamp for expiry, or the 'infinity' string
* @return string
*/
public function encodeExpiry( $expiry ) {
/**
* UPDATE wrapper. Takes a condition array and a SET array.
*
- * @param string $table name of the table to UPDATE. This will be passed through
+ * @param string $table Name of the table to UPDATE. This will be passed through
* DatabaseBase::tableName().
*
* @param array $values An array of values to SET. For each array element,
/**
* Makes an encoded list of strings from an array
- * @param array $a containing the data
+ * @param array $a Containing the data
* @param int $mode Constant
* - LIST_COMMA: comma separated, no field names
* - LIST_AND: ANDed WHERE clause (without the WHERE). See
}
/**
- * @param array $options an associative array of options to be turned into
+ * @param array $options An associative array of options to be turned into
* an SQL query, valid keys are listed in the function.
* @return array
*/
/**
* Check to see if a named lock is available. This is non-blocking.
*
- * @param string $lockName name of lock to poll
- * @param string $method name of method calling us
+ * @param string $lockName Name of lock to poll
+ * @param string $method Name of method calling us
* @return bool
* @since 1.20
*/
/**
* @param bool $value
- * @return mixed null|bool|ResultWrapper
+ * @return null|bool|ResultWrapper
*/
public function setBigSelects( $value = true ) {
if ( $value === 'default' ) {
/** @var string */
public $file;
- /** @var int timestamp */
+ /** @var int Timestamp */
public $pos;
function __construct( $file, $pos ) {
}
/**
- * @return string wikitext of a link to the server software's web site
+ * @return string Wikitext of a link to the server software's web site
*/
public function getSoftwareLink() {
return '[{{int:version-db-oracle-url}} Oracle]';
* @see getSearchPath()
* @see setSearchPath()
* @since 1.19
- * @return array list of actual schemas for the current sesson
+ * @return array List of actual schemas for the current sesson
*/
function getSchemas() {
$res = $this->query( "SELECT current_schemas(false)", __METHOD__ );
* Return schema name fore core MediaWiki tables
*
* @since 1.19
- * @return string core schema name
+ * @return string Core schema name
*/
function getCoreSchema() {
return $this->mCoreSchema;
/**
* Various select options
*
- * @param array $options an associative array of options to be turned into
+ * @param array $options An associative array of options to be turned into
* an SQL query, valid keys are listed in the function.
* @return array
*/
}
/**
- * @return string wikitext of a link to the server software's web site
+ * @return string Wikitext of a link to the server software's web site
*/
public function getSoftwareLink() {
return "[{{int:version-db-sqlite-url}} SQLite]";
/** @var int */
protected $pos = 0;
- /** @var */
+ /** @var object|null */
protected $currentRow = null;
/**
* @param string|null $functionName
*
* @return ORMResult The result set
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode)
*/
public function select( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param array $options
* @param string|null $functionName
*
- * @return array of self
+ * @return array Array of self
*/
public function selectObjects( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param null|string $functionName
*
* @return ResultWrapper
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode)
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode)
*/
public function rawSelect( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null );
* @param bool $collapse Set to false to always return each result row as associative array.
* @param string|null $functionName
*
- * @return array of array
+ * @return array Array of array
*/
public function selectFields( $fields = null, array $conditions = array(),
array $options = array(), $collapse = true, $functionName = null );
* Returns the LBFactory class to use and the load balancer configuration.
*
* @param array $config (e.g. $wgLBFactoryConf)
- * @return string class name
+ * @return string Class name
*/
public static function getLBFactoryClass( array $config ) {
// For configuration backward compatibility after removing
/**
* Get a cached (tracked) load balancer for external storage
*
- * @param string $cluster external storage cluster, or false for core
+ * @param string $cluster External storage cluster, or false for core
* @param bool|string $wiki Wiki ID, or false for the current wiki
* @return LoadBalancer
*/
}
/**
- * @param string $cluster external storage cluster, or false for core
+ * @param string $cluster External storage cluster, or false for core
* @param bool|string $wiki Wiki ID, or false for the current wiki
* @return LoadBalancer
*/
private $mLoadMonitorClass, $mLoadMonitor;
/**
- * @param array $params with keys:
+ * @param array $params Array with keys:
* servers Required. Array of server info structures.
* loadMonitor Name of a class used to fetch server lag and load.
* @throws MWException
* @param array $options
* @param string|null $functionName
*
- * @return array of row objects
- * @throws DBQueryError if the query failed (even if the database was in ignoreErrors mode).
+ * @return array Array of row objects
+ * @throws DBQueryError If the query failed (even if the database was in ignoreErrors mode).
*/
public function selectObjects( $fields = null, array $conditions = array(),
array $options = array(), $functionName = null
* @param array $options
* @param null|string $functionName
* @return ResultWrapper
- * @throws DBQueryError if the query failed (even if the database was in
+ * @throws DBQueryError If the query failed (even if the database was in
* ignoreErrors mode).
*/
public function rawSelect( $fields = null, array $conditions = array(),
* @param bool $collapse Set to false to always return each result row as associative array.
* @param string|null $functionName
*
- * @return array of array
+ * @return array Array of array
*/
public function selectFields( $fields = null, array $conditions = array(),
array $options = array(), $collapse = true, $functionName = null
*
* @see LoadBalancer::reuseConnection
*
- * @param DatabaseBase $db the database
+ * @param DatabaseBase $db
*
* @since 1.20
*/
* This allows for limited transactional logic across multiple backends for storing
* secondary data.
*
- * @param array $updates a list of DataUpdate instances
+ * @param array $updates A list of DataUpdate instances
* @throws Exception|null
*/
public static function runUpdates( $updates ) {
/**
* Do any deferred updates and clear the list
*
- * @param string $commit set to 'commit' to commit after every update to
+ * @param string $commit Set to 'commit' to commit after every update to
* prevent lock contention
*/
public static function doUpdates( $commit = '' ) {
/** @var int Page ID of the article linked from */
public $mId;
- /** @var Title object of the article linked from */
+ /** @var Title Title object of the article linked from */
public $mTitle;
/** @var ParserOutput */
/** @var array Map of category names to sort keys */
public $mCategories;
- /** @var array ap of language codes to titles */
+ /** @var array Map of language codes to titles */
public $mInterlangs;
/** @var array Map of arbitrary name to value */
/**
* Constructor
*
- * @param bool $withTransaction whether this update should be wrapped in a
+ * @param bool $withTransaction Whether this update should be wrapped in a
* transaction (default: true). A transaction is only started if no
* transaction is already in progress, see beginTransaction() for details.
*/
/**
* Constructor
- * @param IContextSource $context context to use, anything else will be ignored
- * @param int $old old ID we want to show and diff with.
- * @param string|int $new either revision ID or 'prev' or 'next'. Default: 0.
+ * @param IContextSource $context Context to use, anything else will be ignored
+ * @param int $old Old ID we want to show and diff with.
+ * @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0.
* @param int $rcid Deprecated, no longer used!
* @param bool $refreshCache If set, refreshes the diff cache
* @param bool $unhide If set, allow viewing deleted revs
*
* @todo move this to TextDifferenceEngine, make DifferenceEngine abstract. At some point.
*
- * @param string $otext old text, must be already segmented
- * @param string $ntext new text, must be already segmented
+ * @param string $otext Old text, must be already segmented
+ * @param string $ntext New text, must be already segmented
*
* @return bool|string
*/