*
* Intended for subclassing, e.g. to add a backwards-compatibility layer.
*
- * @param FormOptions $parameters
+ * @param FormOptions $opts
* @return FormOptions
*/
protected function fetchOptionsFromRequest( $opts ) {
* @todo This should not be static, then we can drop the parameter
* @todo Not called by anything, should be called by doHeader()
*
- * @param $context the object available as $this in non-static functions
+ * @param IContextSource $context The object available as $this in non-static functions
* @return string
*/
public static function makeLegend( IContextSource $context ) {
/**
* Get an HTMLForm descriptor array
- * @return Array
+ * @return array
*/
abstract protected function getFormFields();
/**
* Add pre-text to the form
- * @return String HTML which will be sent to $form->addPreText()
+ * @return string HTML which will be sent to $form->addPreText()
*/
protected function preText() {
return '';
/**
* Add post-text to the form
- * @return String HTML which will be sent to $form->addPostText()
+ * @return string HTML which will be sent to $form->addPostText()
*/
protected function postText() {
return '';
/**
* Play with the HTMLForm if you need to more substantially
- * @param $form HTMLForm
+ * @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
}
/**
* Process the form on POST submission.
- * @param $data Array
- * @return Bool|Array true for success, false for didn't-try, array of errors on failure
+ * @param array $data
+ * @return bool|array True for success, false for didn't-try, array of errors on failure
*/
abstract public function onSubmit( array $data );
/**
* Called from execute() to check if the given user can perform this action.
* Failures here must throw subclasses of ErrorPageError.
- * @param $user User
+ * @param User $user
* @throws UserBlockedError
- * @return Bool true
+ * @return bool True
*/
protected function checkExecutePermissions( User $user ) {
$this->checkPermissions();
/**
* Whether this action requires the wiki not to be locked
- * @return Bool
+ * @return bool
*/
public function requiresWrite() {
return true;
/**
* Whether this action cannot be executed by a blocked user
- * @return Bool
+ * @return bool
*/
public function requiresUnblock() {
return true;
* Return part of the request string for a special redirect page
* This allows passing, e.g. action=history to Special:Mypage, etc.
*
- * @return String
+ * @return string
*/
public function getRedirectQuery() {
$params = array();
* aliases; the first in the array is the canonical alias. All registered special
* pages are guaranteed to have a property entry, and for that property array to
* contain at least one entry (English fallbacks will be added if necessary).
- * @return Object
+ * @return object
*/
static function getAliasList() {
if ( !is_object( self::$aliases ) ) {
* Return categorised listable special pages which are available
* for the current user, and everyone.
*
- * @param $user User object to check permissions, $wgUser will be used if
+ * @param User $user User object to check permissions, $wgUser will be used if
* if not provided
* @return array ( string => Specialpage )
*/
protected $opts;
/**
- * @var Array
+ * @var array
*/
protected $hideGroups = array();
/**
- * @var Array
+ * @var array
*/
protected $hideRights = array();
/**
- * @param $context IContextSource
- * @param $group null Unused
+ * @param IContextSource $context
+ * @param null $group Unused
* @param string $par Parameter passed to the page
*/
function __construct( IContextSource $context = null, $group = null, $par = null ) {
/**
* Show the special page
*
- * @param $par Mixed: parameter passed to the page or null
+ * @param string $par Parameter passed to the page or null
*/
public function execute( $par ) {
global $wgActiveUserDays;
}
/**
- * @param integer $period Seconds (do updates no more often than this)
- * @return integer How many seconds old the cache is
+ * @param intr $period Seconds (do updates no more often than this)
+ * @return int How many seconds old the cache is
*/
public static function mergeActiveUsers( $period ) {
global $wgActiveUserDays;
* Update the query cache as needed
*
* @param DatabaseBase $dbw
- * @param integer $window Maximum time range of new data to scan (in seconds)
+ * @param int $window Maximum time range of new data to scan (in seconds)
* @return bool Success
*/
protected static function doQueryCacheUpdate( DatabaseBase $dbw, $window ) {
/**
* Show the special page
*
- * @param $par Mixed: parameter passed to the page or null
+ * @param string $par Parameter passed to the page or null
*/
public function execute( $par ) {
$request = $this->getRequest();
* @param array $messageNames
* @param string $langcode What language code
* @param bool $foreign Whether the $langcode is not the content language
- * @return array: a 'pages' and 'talks' array with the keys of existing pages
+ * @return array A 'pages' and 'talks' array with the keys of existing pages
*/
public static function getCustomisedStatuses( $messageNames, $langcode = 'en', $foreign = false ) {
// FIXME: This function should be moved to Language:: or something.
/**
* HTML for the top form
*
- * @param $namespace Integer: a namespace constant (default NS_MAIN).
- * @param string $from dbKey we are starting listing at.
- * @param string $to dbKey we are ending listing at.
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param int $namespace A namespace constant (default NS_MAIN).
+ * @param string $from DbKey we are starting listing at.
+ * @param string $to DbKey we are ending listing at.
+ * @param bool $hideredirects Dont show redirects (default false)
* @return string
*/
function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
}
/**
- * @param $namespace Integer (default NS_MAIN)
- * @param string $from list all pages from this name
- * @param string $to list all pages to this name
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param int $namespace (default NS_MAIN)
+ * @param string $from List all pages from this name
+ * @param string $to List all pages to this name
+ * @param bool $hideredirects Dont show redirects (default false)
*/
function showToplevel( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
$output = $this->getOutput();
/**
* Show a line of "ABC to DEF" ranges of articles
*
- * @param string $inpoint lower limit of pagenames
- * @param string $outpoint upper limit of pagenames
- * @param $namespace Integer (Default NS_MAIN)
- * @param bool $hideRedirects don't show redirects. Default: false
+ * @param string $inpoint Lower limit of pagenames
+ * @param string $outpoint Upper limit of pagenames
+ * @param int $namespace (Default NS_MAIN)
+ * @param bool $hideRedirects Don't show redirects. Default: false
* @return string
*/
function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
/**
* @param int $namespace Namespace (Default NS_MAIN)
- * @param string $from list all pages from this name (default FALSE)
- * @param string $to list all pages to this name (default FALSE)
- * @param bool $hideredirects dont show redirects (default FALSE)
+ * @param string $from List all pages from this name (default FALSE)
+ * @param string $to List all pages to this name (default FALSE)
+ * @param bool $hideredirects Dont show redirects (default FALSE)
*/
function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) {
$output = $this->getOutput();
}
/**
- * @param $ns Integer: the namespace of the article
- * @param string $text the name of the article
+ * @param int $ns The namespace of the article
+ * @param string $text The name of the article
* @return array( int namespace, string dbkey, string pagename ) or NULL on error
*/
protected function getNamespaceKeyAndText( $ns, $text ) {
* or as subpage (Special:Block/Foo) */
protected $target;
- /** @var Integer Block::TYPE_ constant */
+ /** @var int Block::TYPE_ constant */
protected $type;
- /** @var User|String the previous block target */
+ /** @var User|string The previous block target */
protected $previousTarget;
- /** @var Bool whether the previous submission of the form asked for HideUser */
+ /** @var bool Whether the previous submission of the form asked for HideUser */
protected $requestedHideUser;
- /** @var Bool */
+ /** @var bool */
protected $alreadyBlocked;
- /** @var Array */
+ /** @var array */
protected $preErrors = array();
public function __construct() {
/**
* Handle some magic here
*
- * @param $par String
+ * @param string $par
*/
protected function setParameter( $par ) {
# Extract variables from the request. Try not to get into a situation where we
/**
* Customizes the HTMLForm a bit
*
- * @param $form HTMLForm
+ * @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
$form->setWrapperLegendMsg( 'blockip-legend' );
/**
* Get the HTMLForm descriptor array for the block form
- * @return Array
+ * @return array
*/
protected function getFormFields() {
global $wgBlockAllowsUTEdit;
* If the user has already been blocked with similar settings, load that block
* and change the defaults for the form fields to match the existing settings.
* @param array $fields HTMLForm descriptor array
- * @return Bool whether fields were altered (that is, whether the target is
+ * @return bool Whether fields were altered (that is, whether the target is
* already blocked)
*/
protected function maybeAlterFormDefaults( &$fields ) {
/**
* Add header elements like block log entries, etc.
- * @return String
+ * @return string
*/
protected function preText() {
$this->getOutput()->addModules( 'mediawiki.special.block' );
/**
* Get a user page target for things like logs.
* This handles account and IP range targets.
- * @param $target User|string
+ * @param User|string $target
* @return Title|null
*/
protected static function getTargetUserTitle( $target ) {
* TODO: should be in Block.php?
* @param string $par subpage parameter passed to setup, or data value from
* the HTMLForm
- * @param $request WebRequest optionally try and get data from a request too
+ * @param WebRequest $request Optionally try and get data from a request too
* @return array( User|string|null, Block::TYPE_ constant|null )
*/
public static function getTargetAndType( $par, WebRequest $request = null ) {
/**
* HTMLForm field validation-callback for Target field.
* @since 1.18
- * @param $value String
- * @param $alldata Array
- * @param $form HTMLForm
+ * @param string $value
+ * @param array $alldata
+ * @param HTMLForm $form
* @return Message
*/
public static function validateTargetField( $value, $alldata, $form ) {
/**
* Submit callback for an HTMLForm object, will simply pass
- * @param $data array
- * @param $form HTMLForm
- * @return Bool|String
+ * @param array $data
+ * @param HTMLForm $form
+ * @return bool|string
*/
public static function processUIForm( array $data, HTMLForm $form ) {
return self::processForm( $data, $form->getContext() );
/**
* Given the form data, actually implement a block
- * @param $data Array
- * @param $context IContextSource
- * @return Bool|String
+ * @param array $data
+ * @param IContextSource $context
+ * @return bool|string
*/
public static function processForm( array $data, IContextSource $context ) {
global $wgBlockAllowsUTEdit, $wgHideUserContribLimit;
* Get an array of suggested block durations from MediaWiki:Ipboptions
* @todo FIXME: This uses a rather odd syntax for the options, should it be converted
* to the standard "**<duration>|<displayname>" format?
- * @param $lang Language|null the language to get the durations in, or null to use
+ * @param Language|null $lang The language to get the durations in, or null to use
* the wiki's content language
- * @return Array
+ * @return array
*/
public static function getSuggestedDurations( $lang = null ) {
$a = array();
/**
* Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute
* ("24 May 2034", etc), into an absolute timestamp we can put into the database.
- * @param string $expiry whatever was typed into the form
- * @return String: timestamp or "infinity" string for the DB implementation
+ * @param string $expiry Whatever was typed into the form
+ * @return string Timestamp or "infinity" string for the DB implementation
*/
public static function parseExpiryInput( $expiry ) {
static $infinity;
/**
* Can we do an email block?
- * @param $user User: the sysop wanting to make a block
- * @return Boolean
+ * @param User $user The sysop wanting to make a block
+ * @return bool
*/
public static function canBlockEmail( $user ) {
global $wgEnableUserEmail, $wgSysopEmailBans;
* bug 15810: blocked admins should not be able to block/unblock
* others, and probably shouldn't be able to unblock themselves
* either.
- * @param $user User|Int|String
- * @param $performer User user doing the request
- * @return Bool|String true or error message key
+ * @param User|int|string $user
+ * @param User $performer User doing the request
+ * @return bool|string True or error message key
*/
public static function checkUnblockSelf( $user, User $performer ) {
if ( is_int( $user ) ) {
/**
* Return a comma-delimited list of "flags" to be passed to the log
* reader for this block, to provide more information in the logs
- * @param array $data from HTMLForm data
- * @param $type Block::TYPE_ constant (USER, RANGE, or IP)
+ * @param array $data From HTMLForm data
+ * @param int $type Block::TYPE_ constant (USER, RANGE, or IP)
* @return string
*/
protected static function blockLogFlags( array $data, $type ) {
/**
* Process the form on POST submission.
- * @param $data Array
- * @return Bool|Array true for success, false for didn't-try, array of errors on failure
+ * @param array $data
+ * @return bool|array True for success, false for didn't-try, array of errors on failure
*/
public function onSubmit( array $data ) {
// This isn't used since we need that HTMLForm that's passed in the
/**
* Main execution point
*
- * @param string $par title fragment
+ * @param string $par Title fragment
*/
public function execute( $par ) {
$this->setHeaders();
protected $page;
/**
- * @param $page SpecialPage
- * @param $conds Array
+ * @param SpecialPage $page
+ * @param array $conds
*/
function __construct( $page, $conds ) {
$this->page = $page;
* Basically don't do any validation. If it's a number that's fine. Also,
* add it to the list if it's not there already
*
- * @param $value
- * @param $alldata
+ * @param string $value
+ * @param array $alldata
* @return bool
*/
function validate( $value, $alldata ) {
* If the cache is enabled or not.
*
* @since 1.20
- * @var boolean
+ * @var bool
*/
protected $cacheEnabled = true;
*
* @since 1.20
*
- * @param $subPage string|null
+ * @param string|null $subPage
*/
protected function afterExecute( $subPage ) {
$this->saveCache();
* Sets if the cache should be enabled or not.
*
* @since 1.20
- * @param boolean $cacheEnabled
+ * @param bool $cacheEnabled
*/
public function setCacheEnabled( $cacheEnabled ) {
$this->cacheHelper->setCacheEnabled( $cacheEnabled );
*
* @since 1.20
*
- * @param integer|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
- * @param boolean|null $cacheEnabled Sets if the cache should be enabled or not.
+ * @param int|null $cacheExpiry Sets the cache expiry, either ttl in seconds or unix timestamp.
+ * @param bool|null $cacheEnabled Sets if the cache should be enabled or not.
*/
public function startCache( $cacheExpiry = null, $cacheEnabled = null ) {
if ( !isset( $this->cacheHelper ) ) {
*
* @since 1.20
*
- * @param integer $cacheExpiry
+ * @param int $cacheExpiry
*/
public function setExpiry( $cacheExpiry ) {
$this->cacheHelper->setExpiry( $cacheExpiry );
*
* @since 1.20
*
- * @param boolean $hasCached
+ * @param bool $hasCached
*/
public function onCacheInitialized( $hasCached ) {
if ( $hasCached ) {
}
/**
- * @return Bool
+ * @return bool
*/
function isListed() {
global $wgAuth;
/**
* Main execution point
+ * @param string $par
*/
function execute( $par ) {
global $wgAuth;
}
/**
- * @param $type string
+ * @param string $type
*/
protected function doReturnTo( $type = 'hard' ) {
$titleObj = Title::newFromText( $this->getRequest()->getVal( 'returnto' ) );
}
/**
- * @param $msg string
+ * @param string $msg
*/
protected function error( $msg ) {
$this->getOutput()->wrapWikiMsg( "<p class='error'>\n$1\n</p>", $msg );
}
/**
- * @param $fields array
+ * @param array $fields
* @return string
*/
protected function pretty( $fields ) {
}
/**
- * @param $user User
- * @param $pass string
- * @param $newaddr string
- * @return bool|string true or string on success, false on failure
+ * @param User $user
+ * @param string $pass
+ * @param string $newaddr
+ * @return bool|string True or string on success, false on failure
*/
protected function attemptChange( User $user, $pass, $newaddr ) {
global $wgAuth, $wgPasswordAttemptThrottle;
/**
* Show a form for filtering namespace and username
*
- * @param $par String
- * @return String
+ * @param string $par
+ * @return string
*/
public function execute( $par ) {
$this->setHeaders();
/**
* Generates the subheading with links
- * @param $userObj User object for the target
- * @return String: appropriately-escaped HTML to be output literally
+ * @param User $userObj User object for the target
+ * @return string Appropriately-escaped HTML to be output literally
* @todo FIXME: Almost the same as getSubTitle in SpecialDeletedContributions.php.
* Could be combined.
*/
/**
* Links to different places.
- * @param $userpage Title: Target user page
- * @param $talkpage Title: Talk page
- * @param $target User: Target user object
+ * @param Title $userpage Target user page
+ * @param Title $talkpage Talk page
+ * @param User $target Target user object
* @return array
*/
public function getUserLinks( Title $userpage, Title $talkpage, User $target ) {
/**
* Generates the namespace selector form with hidden attributes.
- * @return String: HTML fragment
+ * @return string HTML fragment
*/
protected function getForm() {
global $wgScript;
* This method basically executes the exact same code as the parent class, though with
* a hook added, to allow extentions to add additional queries.
*
- * @param string $offset index offset, inclusive
- * @param $limit Integer: exact query limit
- * @param $descending Boolean: query direction, false for ascending, true for descending
+ * @param string $offset Index offset, inclusive
+ * @param int $limit Exact query limit
+ * @param bool $descending Query direction, false for ascending, true for descending
* @return ResultWrapper
*/
function reallyDoQuery( $offset, $limit, $descending ) {
* was not written by the target user.
*
* @todo This would probably look a lot nicer in a table.
- * @param $row
+ * @param object $row
* @return string
*/
function formatRow( $row ) {
* written by the target user.
*
* @todo This would probably look a lot nicer in a table.
- * @param $row
+ * @param stdClass $row
* @return string
*/
function formatRow( $row ) {
/**
* Generates the subheading with links
- * @param $userObj User object for the target
- * @return String: appropriately-escaped HTML to be output literally
+ * @param User $userObj User object for the target
+ * @return string Appropriately-escaped HTML to be output literally
* @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined.
*/
function getSubTitle( $userObj ) {
/**
* Generates the namespace selector form with hidden attributes.
- * @param array $options the options to be included.
+ * @param array $options The options to be included.
* @return string
*/
function getForm( $options ) {
/**
* Main execution point
*
- * @param $mode int
+ * @param int $mode
*/
public function execute( $mode ) {
$this->setHeaders();
* Extract a list of titles from a blob of text, returning
* (prefixed) strings; unwatchable titles are ignored
*
- * @param $list String
+ * @param string $list
* @return array
*/
private function extractTitles( $list ) {
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles of strings, or Title objects
- * @param $output String
+ * @param array $titles Array of strings, or Title objects
+ * @param string $output
*/
private function showTitles( $titles, &$output ) {
$talk = $this->msg( 'talkpagelinktext' )->escaped();
* @param Title $title
* @param int $namespace
* @param string $dbKey
- * @return bool: Whether this item is valid
+ * @return bool Whether this item is valid
*/
private function checkTitle( $title, $namespace, $dbKey ) {
if ( $title
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles of strings, or Title objects
+ * @param array $titles Array of strings, or Title objects
*/
private function watchTitles( $titles ) {
$dbw = wfGetDB( DB_MASTER );
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles of strings, or Title objects
+ * @param array $titles Array of strings, or Title objects
*/
private function unwatchTitles( $titles ) {
$dbw = wfGetDB( DB_MASTER );
/**
* Build the label for a checkbox, with a link to the title, and various additional bits
*
- * @param $title Title
+ * @param Title $title
* @return string
*/
private function buildRemoveLine( $title ) {
* Determine whether we are editing the watchlist, and if so, what
* kind of editing operation
*
- * @param $request WebRequest
- * @param $par mixed
+ * @param WebRequest $request
+ * @param string $par
* @return int
*/
public static function getMode( $request, $par ) {
* Build a set of links for convenient navigation
* between watchlist viewing and editing modes
*
- * @param $unused
+ * @param null $unused
* @return string
*/
public static function buildTools( $unused ) {
*
* @param string $value the value the field was submitted with
* @param array $alldata the data collected from the form
- * @return Mixed Bool true on success, or String error to display.
+ * @return bool|string Bool true on success, or String error to display.
*/
function validate( $value, $alldata ) {
// Need to call into grandparent to be a good citizen. :)
* Validate target User
*
* @param string $target target user name
- * @return User object on success or a string on error
+ * @return User User object on success or a string on error
*/
public static function getTarget( $target ) {
if ( $target == '' ) {
/**
* Check whether a user is allowed to send email
*
- * @param $user User object
- * @param string $editToken edit token
- * @return null on success or string on error
+ * @param User $user
+ * @param string $editToken Edit token
+ * @return string|null Null on success or string on error
*/
public static function getPermissionsError( $user, $editToken ) {
global $wgEnableEmail, $wgEnableUserEmail;
/**
* Form to ask for target user name.
*
- * @param string $name user name submitted.
- * @return String: form asking for user name.
+ * @param string $name User name submitted.
+ * @return string Form asking for user name.
*/
protected function userForm( $name ) {
global $wgScript;
* Submit callback for an HTMLForm object, will simply call submit().
*
* @since 1.20
- * @param $data array
- * @param $form HTMLForm object
+ * @param array $data
+ * @param HTMLForm $form
* @return Status|string|bool
*/
public static function uiSubmit( array $data, HTMLForm $form ) {
*
* @param array $data
* @param IContextSource $context
- * @return Mixed: Status object, or potentially a String on error
+ * @return Status|string|bool Status object, or potentially a String on error
* or maybe even true on success if anything uses the EmailUser hook.
*/
public static function submit( array $data, IContextSource $context ) {
*/
class SpecialExpandTemplates extends SpecialPage {
- /** @var boolean whether or not to show the XML parse tree */
+ /** @var bool Whether or not to show the XML parse tree */
protected $generateXML;
- /** @var boolean whether or not to show the raw HTML code */
+ /** @var bool Whether or not to show the raw HTML code */
protected $generateRawHtml;
- /** @var boolean whether or not to remove comments in the expanded wikitext */
+ /** @var bool Whether or not to remove comments in the expanded wikitext */
protected $removeComments;
- /** @var boolean whether or not to remove <nowiki> tags in the expanded wikitext */
+ /** @var bool Whether or not to remove <nowiki> tags in the expanded wikitext */
protected $removeNowiki;
/** @var maximum size in bytes to include. 50MB allows fixing those huge pages */
* Do the actual page exporting
*
* @param string $page user input on what page(s) to export
- * @param $history Mixed: one of the WikiExporter history export constants
- * @param $list_authors Boolean: Whether to add distinct author list (when
- * not returning full history)
- * @param $exportall Boolean: Whether to export everything
+ * @param int $history One of the WikiExporter history export constants
+ * @param bool $list_authors Whether to add distinct author list (when
+ * not returning full history)
+ * @param bool $exportall Whether to export everything
*/
private function doExport( $page, $history, $list_authors, $exportall ) {
}
/**
- * @param $title Title
+ * @param Title $title
* @return array
*/
private function getPagesFromCategory( $title ) {
}
/**
- * @param $nsindex int
+ * @param int $nsindex
* @return array
*/
private function getPagesFromNamespace( $nsindex ) {
/**
* Expand a list of pages to include templates used in those pages.
- * @param $inputPages array, list of titles to look up
- * @param $pageSet array, associative array indexed by titles for output
- * @return array associative array index by titles
+ * @param array $inputPages List of titles to look up
+ * @param array $pageSet Associative array indexed by titles for output
+ * @return array Associative array index by titles
*/
private function getTemplates( $inputPages, $pageSet ) {
return $this->getLinks( $inputPages, $pageSet,
/**
* Validate link depth setting, if available.
- * @param $depth int
+ * @param int $depth
* @return int
*/
private function validateLinkDepth( $depth ) {
/**
* Expand a list of pages to include pages linked to from that page.
- * @param $inputPages array
- * @param $pageSet array
- * @param $depth int
+ * @param array $inputPages
+ * @param array $pageSet
+ * @param int $depth
* @return array
*/
private function getPageLinks( $inputPages, $pageSet, $depth ) {
/**
* Expand a list of pages to include images used in those pages.
*
- * @param $inputPages array, list of titles to look up
- * @param $pageSet array, associative array indexed by titles for output
+ * @param array $inputPages List of titles to look up
+ * @param array $pageSet Associative array indexed by titles for output
*
* @return array associative array index by titles
*/
/**
* @param Skin $skin
* @param object $result Database row
- * @return String
+ * @return string
*/
function formatResult( $skin, $result ) {
global $wgContLang;
/**
* @param WikiImporter $importer
- * @param $upload
- * @param $interwiki
+ * @param bool $upload
+ * @param string $interwiki
* @param string|bool $reason
*/
function __construct( $importer, $upload, $interwiki, $reason = false ) {
* @param Title $title
* @param Title $origTitle
* @param int $revisionCount
- * @param $successCount
- * @param $pageInfo
+ * @param int $successCount
+ * @param array $pageInfo
* @return void
*/
function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) {
/**
* Return an appropriately formatted LIKE query and the clause
*
- * @param String $query Search pattern to search for
- * @param String $prot Protocol, e.g. 'http://'
+ * @param string $query Search pattern to search for
+ * @param string $prot Protocol, e.g. 'http://'
*
* @return array
*/
* Build the where clause of the query.
*
* Replaces the older mQueryConds member variable.
- * @param $table String Either "image" or "oldimage"
+ * @param string $table Either "image" or "oldimage"
* @return array The query conditions.
*/
protected function buildQueryConds( $table ) {
}
/**
- * @return Array
+ * @return array
*/
function getFieldNames() {
if ( !$this->mFieldNames ) {
*
* This is a bit hacky.
*
- * @param $table String Either 'image' or 'oldimage'
+ * @param string $table Either 'image' or 'oldimage'
* @return array Query info
*/
protected function getQueryInfoReal( $table ) {
* @note $asc is named $descending in IndexPager base class. However
* it is true when the order is ascending, and false when the order
* is descending, so I renamed it to $asc here.
+ * @param int $offset
+ * @param int $limit
+ * @param bool $asc
*/
function reallyDoQuery( $offset, $limit, $asc ) {
$prevTableName = $this->mTableName;
*
* Note: This will throw away some results
*
- * @param $res1 ResultWrapper
- * @param $res2 ResultWrapper
- * @param $limit int
- * @param $ascending boolean See note about $asc in $this->reallyDoQuery
+ * @param ResultWrapper $res1
+ * @param ResultWrapper $res2
+ * @param int $limit
+ * @param bool $ascending See note about $asc in $this->reallyDoQuery
* @return FakeResultWrapper $res1 and $res2 combined
*/
protected function combineResult( $res1, $res2, $limit, $ascending ) {
class UsersPager extends AlphabeticPager {
/**
- * @param $context IContextSource
+ * @param IContextSource $context
* @param array $par (Default null)
- * @param $including boolean Whether this page is being transcluded in
+ * @param bool $including Whether this page is being transcluded in
* another page
*/
function __construct( IContextSource $context = null, $par = null, $including = null ) {
}
/**
- * @return Array
+ * @return array
*/
function getQueryInfo() {
$dbr = wfGetDB( DB_SLAVE );
}
/**
- * @param $row Object
- * @return String
+ * @param stdClass $row
+ * @return string
*/
function formatRow( $row ) {
if ( $row->user_id == 0 ) { #Bug 16487
/**
* Get a list of groups the specified user belongs to
*
- * @param $uid Integer: user id
+ * @param int $uid User id
* @return array
*/
protected static function getGroups( $uid ) {
/**
* Format a link to a group description page
*
- * @param string $group group name
+ * @param string $group Group name
* @param string $username Username
* @return string
*/
/**
* Set page title and show header for this log type
- * @param $type string
+ * @param string $type
* @since 1.19
*/
protected function addHeader( $type ) {
}
/**
- * @param $type string
+ * @param string $type
* @return bool
*/
protected static function isValidType( $type ) {
}
/**
- * @param $skin Skin
- * @param $result
+ * @param Skin $skin
+ * @param object $result
* @return string
*/
function formatResult( $skin, $result ) {
/**
* Make a link to "what links here" for the specified title
*
- * @param $title Title being queried
- * @param string $caption text to display on the link
- * @return String
+ * @param Title $title Title being queried
+ * @param string $caption Text to display on the link
+ * @return string
*/
function makeWlhLink( $title, $caption ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
/**
* Is this report expensive, i.e should it be cached?
*
- * @return Boolean
+ * @return bool
*/
public function isExpensive() {
return true;
/**
* Is there a feed available?
*
- * @return Boolean
+ * @return bool
*/
public function isSyndicated() {
return false;
/**
* Sort the results in descending order?
*
- * @return Boolean
+ * @return bool
*/
public function sortDescending() {
return true;
/**
* Pre-cache page existence to speed up link generation
*
- * @param $db DatabaseBase connection
+ * @param DatabaseBase $db
* @param ResultWrapper $res
*/
public function preprocessResults( $db, $res ) {
*
* @param Title $title Title to make the link for
* @param object $result Result row
- * @return String
+ * @return string
*/
private function makeWlhLink( $title, $result ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
/**
* Show a form for filtering namespace and username
*
- * @param $par String
- * @return String
+ * @param string $par
+ * @return string
*/
public function execute( $par ) {
$out = $this->getOutput();
* size, user links, and a comment
*
* @param object $result Result row
- * @return String
+ * @return string
*/
public function formatRow( $result ) {
$title = Title::newFromRow( $result );
* Should a specific result row provide "patrollable" links?
*
* @param object $result Result row
- * @return Boolean
+ * @return bool
*/
protected function patrollable( $result ) {
return ( $this->getUser()->useNPPatrol() && !$result->rc_patrolled );
/**
* Output a subscription feed listing recent edits to this page.
*
- * @param $type String
+ * @param string $type
*/
protected function feed( $type ) {
global $wgFeed, $wgFeedClasses, $wgFeedLimit;
* Process the form. At this point we know that the user passes all the criteria in
* userCanExecute(), and if the data array contains 'Username', etc, then Username
* resets are allowed.
- * @param $data array
+ * @param array $data
* @throws MWException
* @throws ThrottledError|PermissionsError
- * @return Bool|Array
+ * @return bool|array
*/
public function onSubmit( array $data ) {
global $wgAuth;
/**
* Hide the password reset page if resets are disabled.
- * @return Bool
+ * @return bool
*/
function isListed() {
if ( $this->canChangePassword( $this->getUser() ) === true ) {
/**
* Entry point : initialise variables and call subfunctions.
- * @param string $par becomes "FOO" when called like Special:Prefixindex/FOO (default null)
+ * @param string $par Becomes "FOO" when called like Special:Prefixindex/FOO (default null)
*/
function execute( $par ) {
global $wgContLang;
/**
* HTML for the top form
- * @param $namespace Integer: a namespace constant (default NS_MAIN).
- * @param string $from dbKey we are starting listing at.
+ * @param int $namespace A namespace constant (default NS_MAIN).
+ * @param string $from DbKey we are starting listing at.
* @return string
*/
protected function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) {
}
/**
- * @param $namespace Integer, default NS_MAIN
- * @param $prefix String
- * @param string $from list all pages from this name (default FALSE)
+ * @param int $namespace Default NS_MAIN
+ * @param string $prefix
+ * @param string $from List all pages from this name (default FALSE)
*/
protected function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) {
global $wgContLang;
* @param bool $indefOnly Only indefinite protection
* @param bool $cascadeOnly Only cascading protection
* @param bool $noRedirect Don't show redirects
- * @return String: input form
+ * @return string Input form
*/
protected function showOptions( $namespace, $type = 'edit', $level, $sizetype,
$size, $indefOnly, $cascadeOnly, $noRedirect
* Prepare the namespace filter drop-down; standard namespace
* selector, sans the MediaWiki namespace
*
- * @param $namespace Mixed: pre-select namespace
- * @return String
+ * @param string|null $namespace Pre-select namespace
+ * @return string
*/
protected function getNamespaceMenu( $namespace = null ) {
return Html::rawElement( 'span', array( 'style' => 'white-space: nowrap;' ),
/**
* Creates the input label of the restriction type
- * @param $pr_type string Protection type
+ * @param string $pr_type Protection type
* @return string Formatted HTML
*/
protected function getTypeMenu( $pr_type ) {
/**
* Creates the input label of the restriction level
- * @param $pr_level string Protection level
+ * @param string $pr_level Protection level
* @return string Formatted HTML
*/
protected function getLevelMenu( $pr_level ) {
}
/**
- * @param $namespace Integer:
- * @param $type string
- * @param $level string
+ * @param int $namespace
+ * @param string $type
+ * @param string $level
* @return string
* @private
*/
* Prepare the namespace filter drop-down; standard namespace
* selector, sans the MediaWiki namespace
*
- * @param $namespace Mixed: pre-select namespace
+ * @param string|null $namespace Pre-select namespace
* @return string
*/
function getNamespaceMenu( $namespace = null ) {
/**
* Choose a random title.
- * @return Title object (or null if nothing to choose from)
+ * @return Title|null Title object (or null if nothing to choose from)
*/
public function getRandomTitle() {
// Convert to float, since we do math with the random number.
* was a large gap in the distribution of cl_timestamp values. This way instead
* of things to the right of the gap being favoured, both sides of the gap
* are favoured.
- * @return Array Query information.
+ * @return array Query information.
*/
protected function getQueryInfo( $rand, $offset, $up ) {
$op = $up ? '>=' : '<=';
* Get the lowest and highest timestamp for a category.
*
* @param Title $category
- * @return Array The lowest and highest timestamp
+ * @return array The lowest and highest timestamp
* @throws MWException if category has no entries.
*/
protected function getMinAndMaxForCat( Title $category ) {
* @param float $rand A random number that is converted to a random timestamp
* @param int $offset A small offset to make the result seem more "random"
* @param bool $up Get the result above the random value
- * @param String $fname The name of the calling method
- * @return Array Info for the title selected.
+ * @param string $fname The name of the calling method
+ * @return array Info for the title selected.
*/
private function selectRandomPageFromDB( $rand, $offset, $up, $fname = __METHOD__ ) {
$dbr = wfGetDB( DB_SLAVE );
/**
* Get a comma-delimited list of namespaces we don't have
* any pages in
- * @return String
+ * @return string
*/
private function getNsList() {
global $wgContLang;
/**
* Choose a random title.
- * @return Title object (or null if nothing to choose from)
+ * @return Title|null Title object (or null if nothing to choose from)
*/
public function getRandomTitle() {
$randstr = wfRandom();
/** @var string Edit token for securing image views against XSS */
private $token;
- /** @var Title object for target parameter */
+ /** @var Title Title object for target parameter */
private $targetObj;
/** @var string Deletion type, may be revision, archive, oldimage, filearchive, logging. */
private $typeName;
- /** @var array of checkbox specs (message, name, deletion bits) */
+ /** @var array Array of checkbox specs (message, name, deletion bits) */
private $checks;
/** @var array UI Labels about the current type */
private $typeLabels;
- /** @var RevDel_List object, storing the list of items to be deleted/undeleted */
+ /** @var RevDel_List RevDel_List object, storing the list of items to be deleted/undeleted */
private $revDelList;
/** @var bool Whether user is allowed to perform the action */
/**
* Show a deleted file version requested by the visitor.
* TODO Mostly copied from Special:Undelete. Refactor.
+ * @param string $archiveName
*/
protected function tryShowFile( $archiveName ) {
$repo = RepoGroup::singleton()->getLocalRepo();
/**
* Get the list object for this request
+ * @return RevDel_List
*/
protected function getList() {
if ( is_null( $this->revDelList ) ) {
}
/**
- * @return String: HTML
+ * @return string HTML
*/
protected function buildCheckBoxes() {
$html = '<table>';
/**
* Do the write operations. Simple wrapper for RevDel_*List::setVisibility().
- * @param $bitfield
- * @param $reason
- * @param $title
+ * @param int $bitfield
+ * @param string $reason
+ * @param Title $title
* @return Status
*/
protected function save( $bitfield, $reason, $title ) {
*
* @note: also called from Wiki.php
*
- * @param integer $maxJobs Maximum number of jobs to run
+ * @param int $maxJobs Maximum number of jobs to run
* @return void
*/
public static function executeJobs( $maxJobs ) {
/** @var SearchEngine Search engine */
protected $searchEngine;
- /** @var String Search engine type, if not default */
+ /** @var string Search engine type, if not default */
protected $searchEngineType;
- /** @var Array For links */
+ /** @var array For links */
protected $extraParams = array();
- /** @var String No idea, apparently used by some other classes */
+ /** @var string No idea, apparently used by some other classes */
protected $mPrefix;
/**
/**
* Entry point
*
- * @param string $par or null
+ * @param string $par
*/
public function execute( $par ) {
$this->setHeaders();
/**
* If an exact title match can be found, jump straight ahead to it.
*
- * @param $term String
+ * @param string $term
*/
public function goResult( $term ) {
$this->setupPage( $term );
}
/**
- * @param $term String
+ * @param string $term
*/
public function showResults( $term ) {
global $wgDisableTextSearch, $wgSearchForwardUrl, $wgContLang, $wgScript;
}
/**
- * @param $title Title
+ * @param Title $title
* @param int $num The number of search results found
- * @param $titleMatches null|SearchResultSet results from title search
- * @param $textMatches null|SearchResultSet results from text search
+ * @param null|SearchResultSet $titleMatches Results from title search
+ * @param null|SearchResultSet $textMatches Results from text search
*/
protected function showCreateLink( $title, $num, $titleMatches, $textMatches ) {
// show direct page/create link if applicable
}
/**
- * @param $term string
+ * @param string $term
*/
protected function setupPage( $term ) {
# Should advanced UI be used?
* Extract "power search" namespace settings from the request object,
* returning a list of index numbers to search.
*
- * @param $request WebRequest
- * @return Array
+ * @param WebRequest $request
+ * @return array
*/
protected function powerSearch( &$request ) {
$arr = array();
/**
* Reconstruct the 'power search' options for links
*
- * @return Array
+ * @return array
*/
protected function powerSearchOptions() {
$opt = array();
/**
* Show whole set of results
*
- * @param $matches SearchResultSet
+ * @param SearchResultSet $matches
*
* @return string
*/
/**
* Format a single hit result
*
- * @param $result SearchResult
- * @param array $terms terms to highlight
+ * @param SearchResult $result
+ * @param array $terms Terms to highlight
*
* @return string
*/
/**
* Show results from other wikis
*
- * @param $matches SearchResultSet|array
- * @param $query String
+ * @param SearchResultSet|array $matches
+ * @param string $query
*
* @return string
*/
/**
* Show single interwiki link
*
- * @param $result SearchResult
- * @param $lastInterwiki String
- * @param $query String
+ * @param SearchResult $result
+ * @param string $lastInterwiki
+ * @param string $query
* @param array $customCaptions iw prefix -> caption
*
* @return string
}
/**
- * @param $profile
- * @param $term
- * @return String
+ * @param string $profile
+ * @param string $term
+ * @return string
*/
protected function getProfileForm( $profile, $term ) {
// Hidden stuff
/**
* Generates the power search box at [[Special:Search]]
*
- * @param string $term search term
- * @param $opts array
- * @return String: HTML form
+ * @param string $term Search term
+ * @param array $opts
+ * @return string HTML form
*/
protected function powerSearchBox( $term, $opts ) {
global $wgContLang;
}
/**
- * @param $term
- * @param $resultsShown
- * @param $totalNum
+ * @param string $term
+ * @param int $resultsShown
+ * @param int $totalNum
* @return string
*/
protected function formHeader( $term, $resultsShown, $totalNum ) {
}
/**
- * @param $term string
+ * @param string $term
* @return string
*/
protected function shortDialog( $term ) {
/**
* Make a search link with some target namespaces
*
- * @param $term String
- * @param array $namespaces ignored
- * @param string $label link's text
- * @param string $tooltip link's tooltip
- * @param array $params query string parameters
- * @return String: HTML fragment
+ * @param string $term
+ * @param array $namespaces Ignored
+ * @param string $label Link's text
+ * @param string $tooltip Link's tooltip
+ * @param array $params Query string parameters
+ * @return string HTML fragment
*/
protected function makeSearchLink( $term, $namespaces, $label, $tooltip, $params = array() ) {
$opt = $params;
/**
* Check if query starts with image: prefix
*
- * @param string $term the string to check
- * @return Boolean
+ * @param string $term The string to check
+ * @return bool
*/
protected function startsWithImage( $term ) {
global $wgContLang;
/**
* Check if query starts with all: prefix
*
- * @param string $term the string to check
- * @return Boolean
+ * @param string $term The string to check
+ * @return bool
*/
protected function startsWithAll( $term ) {
* user navigates search results.
* @since 1.18
*
- * @param $key
- * @param $value
+ * @param string $key
+ * @param mixed $value
*/
public function setExtraParam( $key, $value ) {
$this->extraParams[$key] = $value;
}
/**
- * @param $db DatabaseBase
+ * @param DatabaseBase $db
* @param ResultWrapper $res
*/
function preprocessResults( $db, $res ) {
* Submit callback for an HTMLForm object
* @param array $data
* @param HTMLForm $form
- * @return Array( Array(message key, parameters)
+ * @return array|bool Array(message key, parameters)
*/
public static function processUIUnblock( array $data, HTMLForm $form ) {
return self::processUnblock( $data, $form->getContext() );
/**
* Process the form
*
- * @param $data Array
- * @param $context IContextSource
+ * @param array $data
+ * @param IContextSource $context
* @throws ErrorPageError
- * @return Array( Array(message key, parameters) ) on failure, True on success
+ * @return array|bool Array(message key, parameters) on failure, True on success
*/
public static function processUnblock( array $data, IContextSource $context ) {
$performer = $context->getUser();
/**
* Quick check if any archived revisions are present for the page.
*
- * @return boolean
+ * @return bool
*/
function isDeleted() {
$dbr = wfGetDB( DB_SLAVE );
* @param bool $unsuppress Remove all ar_deleted/fa_deleted restrictions of seletected revs
* @param string $comment
* @throws ReadOnlyError
- * @return Status Object containing the number of revisions restored on success
+ * @return Status Status object containing the number of revisions restored on success
*/
private function undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) {
global $wgContentHandlerUseDB;
/**
* Show a form confirming whether a tokenless user really wants to see a file
+ * @param string $key
*/
private function showFileConfirmationForm( $key ) {
$out = $this->getOutput();
/**
* Show a deleted file version requested by the visitor.
+ * @param string $key
*/
private function showFile( $key ) {
$this->getOutput()->disable();
* @param File|ArchivedFile $file
* @param Title $titleObj
* @param string $ts A timestamp
- * @param string $key a storage key
+ * @param string $key A storage key
*
* @return string HTML fragment
*/
/**
* Constructor : initialise object
* Get data POSTed through the form and assign them to the object
- * @param $request WebRequest : data posted.
+ * @param WebRequest $request Data posted.
*/
public function __construct( $request = null ) {
parent::__construct( 'Upload', 'upload' );
* Handle permission checking elsewhere in order to be able to show
* custom error messages.
*
- * @param $user User object
- * @return Boolean
+ * @param User $user
+ * @return bool
*/
public function userCanExecute( User $user ) {
return UploadBase::isEnabled() && parent::userCanExecute( $user );
/**
* Special page entry point
+ * @param string $par
*/
public function execute( $par ) {
$this->setHeaders();
/**
* Show the main upload form
*
- * @param $form Mixed: an HTMLForm instance or HTML string to show
+ * @param HTMLForm|string $form An HTMLForm instance or HTML string to show
*/
protected function showUploadForm( $form ) {
# Add links if file was previously deleted
* Get an UploadForm instance with title and text properly set.
*
* @param string $message HTML string to add to the form
- * @param string $sessionKey session key in case this is a stashed upload
- * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
+ * @param string $sessionKey Session key in case this is a stashed upload
+ * @param bool $hideIgnoreWarning Whether to hide "ignore warning" check box
* @return UploadForm
*/
protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) {
* Stashes the upload, shows the main form, but adds a "continue anyway button".
* Also checks whether there are actually warnings to display.
*
- * @param $warnings Array
- * @return boolean true if warnings were displayed, false if there are no
- * warnings and it should continue processing
+ * @param array $warnings
+ * @return bool True if warnings were displayed, false if there are no
+ * warnings and it should continue processing
*/
protected function showUploadWarning( $warnings ) {
# If there are no warnings, or warnings we can ignore, return early.
*
* Note that the page target can be changed *on the form*, so our check
* state can get out of sync.
- * @return Bool|String
+ * @return bool|string
*/
protected function getWatchCheck() {
if ( $this->getUser()->getOption( 'watchdefault' ) ) {
/**
* Provides output to the user for a result of UploadBase::verifyUpload
*
- * @param array $details result of UploadBase::verifyUpload
+ * @param array $details Result of UploadBase::verifyUpload
* @throws MWException
*/
protected function processVerificationError( $details ) {
/**
* Remove a temporarily kept file stashed by saveTempUploadedFile().
*
- * @return Boolean: success
+ * @return bool Success
*/
protected function unsaveUploadedFile() {
if ( !( $this->mUpload instanceof UploadFromStash ) ) {
* Formats a result of UploadBase::getExistsWarning as HTML
* This check is static and can be done pre-upload via AJAX
*
- * @param array $exists the result of UploadBase::getExistsWarning
- * @return String: empty string if there is no warning or an HTML fragment
+ * @param array $exists The result of UploadBase::getExistsWarning
+ * @return string Empty string if there is no warning or an HTML fragment
*/
public static function getExistsWarning( $exists ) {
if ( !$exists ) {
/**
* Construct a warning and a gallery from an array of duplicate files.
- * @param $dupes array
+ * @param array $dupes
* @return string
*/
public function getDupeWarning( $dupes ) {
* Get the descriptor of the fieldset that contains the file source
* selection. The section is 'source'
*
- * @return Array: descriptor array
+ * @return array Descriptor array
*/
protected function getSourceSection() {
global $wgCopyUploadsFromSpecialUpload;
/**
* Get the messages indicating which extensions are preferred and prohibitted.
*
- * @return String: HTML string containing the message
+ * @return string HTML string containing the message
*/
protected function getExtensionsMessage() {
# Print a list of allowed file extensions, if so configured. We ignore
* Get the descriptor of the fieldset that contains the file description
* input. The section is 'description'
*
- * @return Array: descriptor array
+ * @return array Descriptor array
*/
protected function getDescriptionSection() {
if ( $this->mSessionKey ) {
* Get the descriptor of the fieldset that contains the upload options,
* such as "watch this file". The section is 'options'
*
- * @return Array: descriptor array
+ * @return array Descriptor array
*/
protected function getOptionsSection() {
$user = $this->getUser();
class UploadSourceField extends HTMLTextField {
/**
- * @param $cellAttributes array
+ * @param array $cellAttributes
* @return string
*/
function getLabelHtml( $cellAttributes = array() ) {
*
* @param string $subPage subpage, e.g. in
* http://example.com/wiki/Special:UploadStash/foo.jpg, the "foo.jpg" part
- * @return Boolean: success
+ * @return bool Success
*/
public function execute( $subPage ) {
$this->checkPermissions();
/**
* Get a thumbnail for file, either generated locally or remotely, and stream it out
*
- * @param $file
- * @param $params array
+ * @param File $file
+ * @param array $params
*
- * @return boolean success
+ * @return bool Success
*/
private function outputThumbFromStash( $file, $params ) {
// this global, if it exists, points to a "scaler", as you might find in
/**
* Scale a file (probably with a locally installed imagemagick, or similar)
* and output it to STDOUT.
- * @param $file File
+ * @param File $file
* @param array $params Scaling parameters ( e.g. array( width => '50' ) );
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException|UploadStashFileNotFoundException
- * @return boolean success
+ * @return bool Success
*/
private function outputLocallyScaledThumb( $file, $params, $flags ) {
// n.b. this is stupid, we insist on re-transforming the file every time we are invoked. We rely
* @param array $params Scaling parameters ( e.g. array( width => '50' ) );
* @param int $flags Scaling flags ( see File:: constants )
* @throws MWException
- * @return boolean success
+ * @return bool success
*/
private function outputRemoteScaledThumb( $file, $params, $flags ) {
// This global probably looks something like
/**
* Output HTTP response of raw content
* Side effect: writes HTTP response to STDOUT.
- * @param string $content content
- * @param string $contentType mime type
+ * @param string $content Content
+ * @param string $contentType Mime type
* @throws SpecialUploadStashTooLargeException
* @return bool
*/
}
/*
- * @param $subPage string|null
+ * @param string|null $subPage
*/
public function execute( $subPage ) {
if ( session_id() == '' ) {
* Actually add a user to the database.
* Give it a User object that has been initialised with a name.
*
- * @param $u User object.
- * @param $autocreate boolean -- true if this is an autocreation via auth plugin
- * @return Status object, with the User object in the value member on success
+ * @param User $u
+ * @param bool $autocreate True if this is an autocreation via auth plugin
+ * @return Status Status object, with the User object in the value member on success
* @private
*/
function initUser( $u, $autocreate ) {
* Increment the login attempt throttle hit count for the (username,current IP)
* tuple unless the throttle was already reached.
* @param string $username The user name
- * @return Bool|Integer The integer hit count or True if it is already at the limit
+ * @return bool|int The integer hit count or True if it is already at the limit
*/
public static function incLoginThrottle( $username ) {
global $wgPasswordAttemptThrottle, $wgMemc, $wgRequest;
* Attempt to automatically create a user on login. Only succeeds if there
* is an external authentication method which allows it.
*
- * @param $user User
+ * @param User $user
*
- * @return integer Status code
+ * @return int Status code
*/
function attemptAutoCreate( $user ) {
global $wgAuth;
}
/**
- * @param $u User object
- * @param $throttle Boolean
- * @param string $emailTitle message name of email title
- * @param string $emailText message name of email text
- * @return Status object
+ * @param User $u
+ * @param bool $throttle
+ * @param string $emailTitle Message name of email title
+ * @param string $emailText Message name of email text
+ * @return Status
*/
function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle',
$emailText = 'passwordremindertext'
/**
* Display an "successful action" page.
*
- * @param string|Message $title page's title
- * @param $msgname string
- * @param $injected_html string
+ * @param string|Message $title Page's title
+ * @param string $msgname
+ * @param string $injected_html
*/
private function displaySuccessfulAction( $title, $msgname, $injected_html ) {
$out = $this->getOutput();
* there is a block on them or their IP which prevents account creation. Note that
* User::isBlockedFromCreateAccount(), which gets this block, ignores the 'hardblock'
* setting on blocks (bug 13611).
- * @param $block Block the block causing this error
+ * @param Block $block The block causing this error
* @throws ErrorPageError
*/
function userBlockedMessage( Block $block ) {
* Extensions can use this to reuse the "return to" logic after
* inject steps (such as redirection) into the login process.
*
- * @param $type string, one of the following:
+ * @param string $type One of the following:
* - error: display a return to link ignoring $wgRedirectOnLogin
* - success: display a return to link using $wgRedirectOnLogin if needed
* - successredirect: send an HTTP redirect using $wgRedirectOnLogin if needed
/**
* Add a "return to" link or redirect to it.
*
- * @param $type string, one of the following:
+ * @param string $type One of the following:
* - error: display a return to link ignoring $wgRedirectOnLogin
* - success: display a return to link using $wgRedirectOnLogin if needed
* - successredirect: send an HTTP redirect using $wgRedirectOnLogin if needed
* Whether the login/create account form should display a link to the
* other form (in addition to whatever the skin provides).
*
- * @param $user User
+ * @param User $user
* @return bool
*/
private function showCreateOrLoginLink( &$user ) {
/**
* Get the login token from the current session
- * @return Mixed
+ * @return mixed
*/
public static function getLoginToken() {
global $wgRequest;
/**
* Get the createaccount token from the current session
- * @return Mixed
+ * @return mixed
*/
public static function getCreateaccountToken() {
global $wgRequest;
* Save user groups changes in the database.
* Data comes from the editUserGroupsForm() form function
*
- * @param string $username username to apply changes to.
- * @param string $reason reason for group change
+ * @param string $username Username to apply changes to.
+ * @param string $reason Reason for group change
* @param User|UserRightsProxy $user Target user object.
* @return null
*/
/**
* Add a rights log entry for an action.
+ * @param User $user
+ * @param array $oldGroups
+ * @param array $newGroups
+ * @param array $reason
*/
function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
$logEntry = new ManualLogEntry( 'rights', 'rights' );
/**
* Edit user groups membership
- * @param string $username name of the user.
+ * @param string $username Name of the user.
*/
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username );
*
* Side effects: error output for invalid access
* @param string $username
- * @return Status object
+ * @return Status
*/
public function fetchUser( $username ) {
global $wgUserrightsInterwikiDelimiter;
* Make a list of group names to be stored as parameter for log entries
*
* @deprecated since 1.21; use LogFormatter instead.
- * @param $ids array
+ * @param array $ids
* @return string
*/
function makeGroupNameListForLog( $ids ) {
/**
* Format a link to a group description page
*
- * @param $group string
+ * @param string $group
* @return string
*/
private static function buildGroupLink( $group ) {
/**
* Format a link to a group member description page
*
- * @param $group string
+ * @param string $group
* @return string
*/
private static function buildGroupMemberLink( $group ) {
* Adds a table with checkboxes where you can select what groups to add/remove
*
* @todo Just pass the username string?
- * @param array $usergroups groups the user belongs to
- * @param $user User a user object
+ * @param array $usergroups Groups the user belongs to
+ * @param User $user
* @return string XHTML table element with checkboxes
*/
private function groupCheckboxes( $usergroups, $user ) {
}
/**
- * @param string $group the name of the group to check
+ * @param string $group The name of the group to check
* @return bool Can we add the group?
*/
private function canAdd( $group ) {
/**
* Show a rights log fragment for the specified user
*
- * @param $user User to show log for
- * @param $output OutputPage to use
+ * @param User $user User to show log for
+ * @param OutputPage $output OutputPage to use
*/
protected function showLogFragment( $user, $output ) {
$rightsLogPage = new LogPage( 'rights' );
/**
* Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text
*
- * @return String
+ * @return string
*/
public static function getCopyrightAndAuthorList() {
global $wgLang;
/**
* Return a string of the MediaWiki version with SVN revision if available.
*
- * @param $flags String
+ * @param string $flags
* @return mixed
*/
public static function getVersion( $flags = '' ) {
*
* @since 1.17
*
- * @param $type String
+ * @param string $type
*
* @return string
*/
*
* @since 1.17
*
- * @param $type String
- * @param $message String
+ * @param string $type
+ * @param string $message
*
* @return string
*/
/**
* Callback to sort extensions by type.
- * @param $a array
- * @param $b array
+ * @param array $a
+ * @param array $b
* @return int
*/
function compare( $a, $b ) {
* - Description of extension (descriptionmsg or description)
* - List of authors (author) and link to a ((AUTHORS)|(CREDITS))(\.txt)? file if it exists
*
- * @param $extension Array
+ * @param array $extension
*
- * @return string raw HTML
+ * @return string Raw HTML
*/
function getCreditsForExtension( array $extension ) {
$out = $this->getOutput();
/**
* Convert an array or object to a string for display.
*
- * @param mixed $list will convert an array to string if given and return
+ * @param mixed $list Will convert an array to string if given and return
* the paramater unaltered otherwise
*
* @return mixed
* url The subversion URL of the directory
* repo-url The base URL of the repository
* viewvc-url A ViewVC URL pointing to the checked-out revision
- * @param $dir string
+ * @param string $dir
* @return array|bool
*/
public static function getSvnInfo( $dir ) {
/**
* Retrieve the revision number of a Subversion working directory.
*
- * @param string $dir directory of the svn checkout
+ * @param string $dir Directory of the svn checkout
*
* @return int Revision number
*/
}
/**
- * @param string $dir directory of the git checkout
- * @return bool|String sha1 of commit HEAD points to
+ * @param string $dir Directory of the git checkout
+ * @return bool|string Sha1 of commit HEAD points to
*/
public static function getGitHeadSha1( $dir ) {
$repo = new GitInfo( $dir );
* Maps old pre-1.23 request parameters Watchlist used to use (different from Recentchanges' ones)
* to the current ones.
*
- * @param FormOptions $parameters
+ * @param FormOptions $opts
* @return FormOptions
*/
protected function fetchOptionsFromRequest( $opts ) {
* Count the number of items on a user's watchlist
*
* @param DatabaseBase $dbr A database connection
- * @return Integer
+ * @return int
*/
protected function countItems( $dbr ) {
# Fetch the raw count