class BadTitleError extends ErrorPageError {
/**
* @param string|Message $msg A message key (default: 'badtitletext')
- * @param array $params parameter to wfMessage()
+ * @param array $params Parameter to wfMessage()
*/
public function __construct( $msg = 'badtitletext', $params = array() ) {
parent::__construct( 'badtitle', $msg, $params );
*
* @param string|Message $title Message key (string) for page title, or a Message object
* @param string|Message $msg Message key (string) for error text, or a Message object
- * @param array $params with parameters to wfMessage()
+ * @param array $params Array with parameters to wfMessage()
*/
public function __construct( $title, $msg, $params = array() ) {
$this->title = $title;
* itself. It also fails-over to the next possible clusters
* as provided in the first parameter.
*
- * @param array $tryStores refer to $wgDefaultExternalStore
+ * @param array $tryStores Refer to $wgDefaultExternalStore
* @param string $data
* @param array $params Associative array of ExternalStoreMedium parameters
* @return string|bool The URL of the stored data item, or false on error
/**
* Get an associative array containing information about a file in the local filesystem.
*
- * @param string $path absolute local filesystem path
+ * @param string $path Absolute local filesystem path
* @param mixed $ext The file extension, or true to extract it from the filename.
* Set it to false to ignore the extension.
* @return array
protected $params = array();
/**
- * @param string $dir file system directory
+ * @param string $dir File system directory
* @param array $params
*/
public function __construct( $dir, array $params ) {
/**
* Return an appropriate iterator object to wrap
*
- * @param string $dir file system directory
+ * @param string $dir File system directory
* @return Iterator
*/
protected function initIterator( $dir ) {
* @param string $storagePath
* @param string|null $content File data
* @param string|null $fsPath File system path
- * @return MIME type
+ * @return string MIME type
*/
protected function getContentType( $storagePath, $content, $fsPath ) {
return call_user_func_array( $this->mimeCallback, func_get_args() );
*
* @param string $container Resolved container name
* @param string $dir Resolved path relative to container
- * @param string $after null
+ * @param string $after
* @param int $limit
* @param array $params
* @return Traversable|array
/**
* Get the position ID of the latest journal entry at some point in time
*
- * @param int|string $time timestamp
+ * @param int|string $time Timestamp
* @return int|bool
*/
final public function getPositionAtTime( $time ) {
/**
* @see FileJournal::doGetPositionAtTime()
- * @param int|string $time timestamp
+ * @param int|string $time Timestamp
* @return int|bool
*/
protected function doGetPositionAtTime( $time ) {
protected $domain; // string; domain (usually wiki ID)
- /** @var array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) */
+ /** @var array Array of (name => ('class' => ..., 'config' => ..., 'instance' => ...)) */
protected $managers = array();
/**
/** @var array (server name => bool) */
protected $serversUp = array();
- /** @var string random UUID */
+ /** @var string Random UUID */
protected $session = '';
/**
/** @var array Map server names to hostname/IP and port numbers */
protected $lockServers = array();
- /** @var string random UUID */
+ /** @var string Random UUID */
protected $session = '';
/**
* Returns a FileRepoStatus object with the file Virtual URL in the value,
* file can later be disposed using FileRepo::freeTemp().
*
- * @param string $originalName the base name of the file as specified
+ * @param string $originalName The base name of the file as specified
* by the user. The file extension will be maintained.
* @param string $srcPath The current location of the file.
* @return FileRepoStatus Object with the URL in the value.
* Get an array or iterator of file objects for files that have a given
* SHA-1 content hash.
*
- * @param string $hash a sha1 hash to look for
+ * @param string $hash A sha1 hash to look for
* @return array
*/
function findBySha1( $hash ) {
/**
* Find all instances of files with this key
*
- * @param string $hash base 36 SHA-1 hash
+ * @param string $hash Base 36 SHA-1 hash
* @return array Array of File objects
*/
function findBySha1( $hash ) {
/**
* Find all instances of files with this keys
*
- * @param array $hashes base 36 SHA-1 hashes
+ * @param array $hashes Base 36 SHA-1 hashes
* @return array Array of array of File objects
*/
function findBySha1s( array $hashes ) {
* Split a virtual URL into repo, zone and rel parts
* @param string $url
* @throws MWException
- * @return array containing repo, zone and rel
+ * @return array Containing repo, zone and rel
*/
function splitVirtualUrl( $url ) {
if ( substr( $url, 0, 9 ) != 'mwrepo://' ) {
* @ingroup FileAbstraction
*/
class ArchivedFile {
- /** @var int filearchive row ID */
+ /** @var int Filearchive row ID */
private $id;
/** @var string File name */
/** @var int File size in bytes */
private $size;
- /** @var int size in bytes */
+ /** @var int Size in bytes */
private $bits;
/** @var int Width */
/** @var string Relative path including trailing slash */
protected $hashPath;
- /** @var string number of pages of a multipage document, or false for
+ /** @var string Number of pages of a multipage document, or false for
* documents which aren't multipage documents
*/
protected $pageCount;
*
* Currently used to add a warning to the image description page
*
- * @return bool false if the main image is both animated
+ * @return bool False if the main image is both animated
* and the thumbnail is not. In all other cases must return
* true. If image is not renderable whatsoever, should
* return true.
/**
* Returns the most appropriate source image for the thumbnail, given a target thumbnail size
* @param array $params
- * @return array source path and width/height of the source
+ * @return array Source path and width/height of the source
*/
public function getThumbnailSource( $params ) {
if ( $this->repo
*
* @param string $zone Name of requested zone
* @param bool|string $suffix If not false, the name of a file in zone
- * @return string path
+ * @return string Path
*/
function getZoneUrl( $zone, $suffix = false ) {
$this->assertRepoDefined();
* Get the URL of the thumbnail directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a thumbnail file
- * @return string path
+ * @return string Path
*/
function getThumbUrl( $suffix = false ) {
return $this->getZoneUrl( 'thumb', $suffix );
* Get the URL of the transcoded directory, or a particular file if $suffix is specified
*
* @param bool|string $suffix If not false, the name of a media file
- * @return string path
+ * @return string Path
*/
function getTranscodedUrl( $suffix = false ) {
return $this->getZoneUrl( 'transcoded', $suffix );
* @param int $flags A bitwise combination of:
* File::DELETE_SOURCE Delete the source file, i.e. move rather than copy
* @param array $options Optional additional parameters
- * @return FileRepoStatus object. On success, the value member contains the
+ * @return FileRepoStatus On success, the value member contains the
* archive name, or an empty string if it was a new file.
*
* STUB
/** @var bool Does the file exist on disk? (loadFromXxx) */
protected $fileExists;
- /** @var int image width */
+ /** @var int Image width */
protected $width;
- /** @var int image height */
+ /** @var int Image height */
protected $height;
/** @var int Returned by getimagesize (loadFromXxx) */
* Create a LocalFile from a SHA-1 key
* Do not call this except from inside a repo class.
*
- * @param string $sha1 base-36 SHA-1
+ * @param string $sha1 Base-36 SHA-1
* @param LocalRepo $repo
* @param string|bool $timestamp MW_timestamp (optional)
* @return bool|LocalFile
/**
* @param DatabaseBase $dbr
* @param string $fname
- * @return array|false
+ * @return array|bool
*/
private function loadFieldsWithTimestamp( $dbr, $fname ) {
$fieldMap = false;
/**
* Get all thumbnail names previously generated for this file
* @param string|bool $archiveName Name of an archive file, default false
- * @return array first element is the base dir, then files in that base dir.
+ * @return array First element is the base dir, then files in that base dir.
*/
function getThumbnails( $archiveName = false ) {
if ( $archiveName ) {
* Start a transaction and lock the image for update
* Increments a reference counter if the lock is already held
* @throws MWException Throws an error if the lock was not acquired
- * @return bool success
+ * @return bool Success
*/
function lock() {
$dbw = $this->repo->getMasterDB();
* Create a OldLocalFile from a SHA-1 key
* Do not call this except from inside a repo class.
*
- * @param string $sha1 base-36 SHA-1
+ * @param string $sha1 Base-36 SHA-1
* @param LocalRepo $repo
* @param string|bool $timestamp MW_timestamp (optional)
*
* @param Title $title
* @param FileRepo $repo
* @param string $time Timestamp or null to load by archive name
- * @param string $archiveName archive name or null to load by timestamp
+ * @param string $archiveName Archive name or null to load by timestamp
* @throws MWException
*/
function __construct( $title, $repo, $time, $archiveName ) {
}
/**
- * @param MediaTransformOutput|bool $thumb the thumbnail, or false if no
+ * @param MediaTransformOutput|bool $thumb The thumbnail, or false if no
* thumb (which can happen)
* @return float
*/
* @param array $descriptor Input Descriptor, as described above
*
* @throws MWException
- * @return HTMLFormField subclass
+ * @return HTMLFormField Instance of a subclass of HTMLFormField
*/
public static function loadInputFromParameters( $fieldname, $descriptor ) {
$class = self::getClassFromDescriptor( $fieldname, $descriptor );
/**
* Add footer text, inside the form.
*
- * @param string $msg complete text of message to display
+ * @param string $msg Complete text of message to display
* @param string|null $section The section to add the footer text to
*
* @return HTMLForm $this for chaining calls (since 1.20)
* Only useful when the method is "post".
*
* @since 1.24
- * @param string|array Salt to use
- * @return HTMLForm $this for chaining calls
+ * @param string|array $salt Salt to use
+ * @return HTMLForm $this For chaining calls
*/
public function setTokenSalt( $salt ) {
$this->mTokenSalt = $salt;
*
* @param bool|string|array|Status $submitResult Output from HTMLForm::trySubmit()
*
- * @return Nothing, should be last call
+ * @return void Nothing, should be last call
*/
function displayForm( $submitResult ) {
$this->getOutput()->addHTML( $this->getHTML( $submitResult ) );
/**
* Format a stack of error messages into a single HTML string
*
- * @param array $errors of message keys/values
+ * @param array $errors Array of message keys/values
*
* @return string HTML, a "<ul>" list of errors
*/
/**
* Set the text for the submit button
*
- * @param string $t plaintext.
+ * @param string $t Plaintext
*
* @return HTMLForm $this for chaining calls (since 1.20)
*/
*
* @param array $data
*
- * @return
+ * @return array
*/
function filterDataForSubmit( $data ) {
return $data;
* the input object itself. It should not implement the surrounding
* table cells/rows, or labels/help messages.
*
- * @param string $value the value to set the input to; eg a default
+ * @param string $value The value to set the input to; eg a default
* text for a text input.
*
* @return string Valid HTML.
*
* @param array $alldata
* @param array $params
- * @return boolean
+ * @return bool
*/
protected function isHiddenRecurse( array $alldata, array $params ) {
$origParams = $params;
* @param string|array $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool true to cancel the submission
+ * @return bool True to cancel the submission
*/
function cancelSubmit( $value, $alldata ) {
return false;
* @param string|array $value The value the field was submitted with
* @param array $alldata The data collected from the form
*
- * @return bool|string true on success, or String error to display, or
+ * @return bool|string True on success, or String error to display, or
* false to fail validation without displaying an error.
*/
function validate( $value, $alldata ) {
*
* Used only by environment checks.
*
- * @param string $path path to search
- * @param array $names of executable names
+ * @param string $path Path to search
+ * @param array $names Array of executable names
* @param array|bool $versionInfo False or array with two members:
* 0 => Command to run for version check, with $1 for the full executable name
* 1 => String to compare the output with
/**
* Main entry point.
*
- * @param array[] $session initial session array
+ * @param array[] $session Initial session array
*
* @return array[] New session array
*/
/**
* Get the starting tags of a fieldset.
*
- * @param string $legend message name
+ * @param string $legend Message name
*
* @return string
*/
*/
protected $mWikiID;
- /** @var bool whether the wiki is in this project */
+ /** @var bool Whether the wiki is in this project */
protected $mLocal;
/** @var bool Whether interwiki transclusions are allowed */
* @note More logic is explained in DefaultSettings.
*
* @param string $prefix Interwiki prefix
- * @return Interwiki object
+ * @return Interwiki
*/
protected static function getInterwikiCached( $prefix ) {
$value = self::getInterwikiCacheEntry( $prefix );
/**
* Insert a single job into the queue.
- * @return bool true on success
+ * @return bool True on success
* @deprecated since 1.21
*/
public function insert() {
* Callers should use DuplicateJob::newFromJob() instead
*
* @param Title $title
- * @param array $params job parameters
+ * @param array $params Job parameters
*/
function __construct( $title, $params ) {
parent::__construct( 'duplicate', $title, $params );
class NullJob extends Job {
/**
* @param Title $title
- * @param array $params job parameters (lives, usleep)
+ * @param array $params Job parameters (lives, usleep)
*/
function __construct( $title, $params ) {
parent::__construct( 'null', $title, $params );
* Store a result in the session data. Note that the caller is responsible
* for appropriate session_start and session_write_close calls.
*
- * @param string $result the result (Success|Warning|Failure)
- * @param string $dataKey the key of the extra data
+ * @param string $result The result (Success|Warning|Failure)
+ * @param string $dataKey The key of the extra data
* @param mixed $dataValue The extra data itself
*/
protected function storeResultInSession( $result, $dataKey, $dataValue ) {
* Set the visibility restrictions for displaying content.
* If set to public, and an item is deleted, then it will be replaced
* with a placeholder even if the context user is allowed to view it.
- * @param int $audience self::FOR_THIS_USER or self::FOR_PUBLIC
+ * @param int $audience Const self::FOR_THIS_USER or self::FOR_PUBLIC
*/
public function setAudience( $audience ) {
$this->audience = ( $audience == self::FOR_THIS_USER )
* Even uglier hack to maintain backwards compatibilty with IRC bots
* (bug 34508).
* @see getActionText()
- * @return string text
+ * @return string Text
*/
public function getIRCActionComment() {
$actionComment = $this->getIRCActionText();
* Even uglier hack to maintain backwards compatibilty with IRC bots
* (bug 34508).
* @see getActionText()
- * @return string text
+ * @return string Text
*/
public function getIRCActionText() {
$this->plaintext = true;
* * number: Format value as number
* @param string $value The parameter value that should
* be formated
- * @return string|Message::numParam|Message::rawParam
- * Formated value
+ * @return string|array Formated value
* @since 1.21
*/
protected function formatParameterValue( $type, $value ) {
}
/**
- * @return array of titles that should be preloaded with LinkBatch.
+ * @return array Array of titles that should be preloaded with LinkBatch
*/
public function getPreloadTitles() {
return array();
}
/**
- * @return int log_id of the inserted log entry
+ * @return int The log_id of the inserted log entry
*/
protected function saveContent() {
global $wgLogRestrictions;
/**
* Get the list of valid log types
*
- * @return array of strings
+ * @return array Array of strings
*/
public static function validTypes() {
global $wgLogTypes;
* Get the log header for the given log type
*
* @todo handle missing log types
- * @param string $type logtype
+ * @param string $type Logtype
* @return string Header text of this logtype
* @deprecated since 1.19, warnings in 1.21. Use getDescription()
*/
* Generate text for a log entry.
* Only LogFormatter should call this function.
*
- * @param string $type log type
- * @param string $action log action
+ * @param string $type Log type
+ * @param string $action Log action
* @param Title|null $title Title object or null
* @param Skin|null $skin Skin object or null. If null, we want to use the wiki
* content language, since that will go to the IRC feed.
- * @param array $params parameters
+ * @param array $params Parameters
* @param bool $filterWikilinks Whether to filter wiki links
* @return string HTML
*/
/**
* Add a log entry
*
- * @param string $action one of '', 'block', 'protect', 'rights', 'delete',
+ * @param string $action One of '', 'block', 'protect', 'rights', 'delete',
* 'upload', 'move', 'move_redir'
* @param Title $target Title object
- * @param string $comment description associated
- * @param array $params parameters passed later to wfMessage function
+ * @param string $comment Description associated
+ * @param array $params Parameters passed later to wfMessage function
* @param null|int|User $doer The user doing the action. null for $wgUser
*
- * @return int log_id of the inserted log entry
+ * @return int The log_id of the inserted log entry
*/
public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
global $wgContLang;