From: umherirrender Date: Sat, 19 Apr 2014 08:16:52 +0000 (+0200) Subject: Fixed some @params documentation (includes/[specialpage|specials]) X-Git-Tag: 1.31.0-rc.0~16144^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=f971300427daf3b160ea355b671006830e58b02c;p=lhc%2Fweb%2Fwiklou.git Fixed some @params documentation (includes/[specialpage|specials]) Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Also added some missing @param. Change-Id: Icf6f36bb53322b39cd5c89523dbd0e4ab10b9ec9 --- diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index bc0b8ff26b..7e108af0fd 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -164,7 +164,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { * * Intended for subclassing, e.g. to add a backwards-compatibility layer. * - * @param FormOptions $parameters + * @param FormOptions $opts * @return FormOptions */ protected function fetchOptionsFromRequest( $opts ) { @@ -398,7 +398,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { * @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 ) { diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php index 74962620e7..60203961eb 100644 --- a/includes/specialpage/FormSpecialPage.php +++ b/includes/specialpage/FormSpecialPage.php @@ -37,13 +37,13 @@ abstract class FormSpecialPage extends SpecialPage { /** * 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 ''; @@ -51,7 +51,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * 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 ''; @@ -59,7 +59,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * Play with the HTMLForm if you need to more substantially - * @param $form HTMLForm + * @param HTMLForm $form */ protected function alterForm( HTMLForm $form ) { } @@ -113,8 +113,8 @@ abstract class FormSpecialPage extends SpecialPage { /** * 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 ); @@ -155,9 +155,9 @@ abstract class FormSpecialPage extends SpecialPage { /** * 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(); @@ -176,7 +176,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * Whether this action requires the wiki not to be locked - * @return Bool + * @return bool */ public function requiresWrite() { return true; @@ -184,7 +184,7 @@ abstract class FormSpecialPage extends SpecialPage { /** * Whether this action cannot be executed by a blocked user - * @return Bool + * @return bool */ public function requiresUnblock() { return true; diff --git a/includes/specialpage/RedirectSpecialPage.php b/includes/specialpage/RedirectSpecialPage.php index 3fbb0e5dcc..3bdbc3ce4f 100644 --- a/includes/specialpage/RedirectSpecialPage.php +++ b/includes/specialpage/RedirectSpecialPage.php @@ -67,7 +67,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { * 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(); diff --git a/includes/specialpage/SpecialPageFactory.php b/includes/specialpage/SpecialPageFactory.php index 15a71fffdc..2305f21c98 100644 --- a/includes/specialpage/SpecialPageFactory.php +++ b/includes/specialpage/SpecialPageFactory.php @@ -232,7 +232,7 @@ class SpecialPageFactory { * 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 ) ) { @@ -361,7 +361,7 @@ class SpecialPageFactory { * 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 ) */ diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index f739d3bec3..d963677220 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -38,18 +38,18 @@ class ActiveUsersPager extends UsersPager { 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 ) { @@ -230,7 +230,7 @@ class SpecialActiveUsers extends SpecialPage { /** * 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; @@ -270,8 +270,8 @@ class SpecialActiveUsers extends SpecialPage { } /** - * @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; @@ -311,7 +311,7 @@ class SpecialActiveUsers extends SpecialPage { * 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 ) { diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index 6b382ad097..33c92b5e0a 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -43,7 +43,7 @@ class SpecialAllmessages extends SpecialPage { /** * 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(); @@ -253,7 +253,7 @@ class AllmessagesTablePager extends TablePager { * @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. diff --git a/includes/specials/SpecialAllpages.php b/includes/specials/SpecialAllpages.php index 70949d4ec2..a61c90daa8 100644 --- a/includes/specials/SpecialAllpages.php +++ b/includes/specials/SpecialAllpages.php @@ -115,10 +115,10 @@ class SpecialAllpages extends IncludableSpecialPage { /** * 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 ) { @@ -174,10 +174,10 @@ class SpecialAllpages extends IncludableSpecialPage { } /** - * @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(); @@ -318,10 +318,10 @@ class SpecialAllpages extends IncludableSpecialPage { /** * 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 ) { @@ -361,9 +361,9 @@ class SpecialAllpages extends IncludableSpecialPage { /** * @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(); @@ -559,8 +559,8 @@ class SpecialAllpages extends IncludableSpecialPage { } /** - * @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 ) { diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 57637c97c4..e0ebd4da2d 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -32,19 +32,19 @@ class SpecialBlock extends FormSpecialPage { * 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() { @@ -70,7 +70,7 @@ class SpecialBlock extends FormSpecialPage { /** * 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 @@ -91,7 +91,7 @@ class SpecialBlock extends FormSpecialPage { /** * Customizes the HTMLForm a bit * - * @param $form HTMLForm + * @param HTMLForm $form */ protected function alterForm( HTMLForm $form ) { $form->setWrapperLegendMsg( 'blockip-legend' ); @@ -116,7 +116,7 @@ class SpecialBlock extends FormSpecialPage { /** * Get the HTMLForm descriptor array for the block form - * @return Array + * @return array */ protected function getFormFields() { global $wgBlockAllowsUTEdit; @@ -227,7 +227,7 @@ class SpecialBlock extends FormSpecialPage { * 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 ) { @@ -305,7 +305,7 @@ class SpecialBlock extends FormSpecialPage { /** * Add header elements like block log entries, etc. - * @return String + * @return string */ protected function preText() { $this->getOutput()->addModules( 'mediawiki.special.block' ); @@ -436,7 +436,7 @@ class SpecialBlock extends FormSpecialPage { /** * 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 ) { @@ -454,7 +454,7 @@ class SpecialBlock extends FormSpecialPage { * 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 ) { @@ -503,9 +503,9 @@ class SpecialBlock extends FormSpecialPage { /** * 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 ) { @@ -583,9 +583,9 @@ class SpecialBlock extends FormSpecialPage { /** * 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() ); @@ -593,9 +593,9 @@ class SpecialBlock extends FormSpecialPage { /** * 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; @@ -799,9 +799,9 @@ class SpecialBlock extends FormSpecialPage { * 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 "**|" 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(); @@ -828,8 +828,8 @@ class SpecialBlock extends FormSpecialPage { /** * 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; @@ -854,8 +854,8 @@ class SpecialBlock extends FormSpecialPage { /** * 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; @@ -867,9 +867,9 @@ class SpecialBlock extends FormSpecialPage { * 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 ) ) { @@ -901,8 +901,8 @@ class SpecialBlock extends FormSpecialPage { /** * 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 ) { @@ -947,8 +947,8 @@ class SpecialBlock extends FormSpecialPage { /** * 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 diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php index 4e7043d77b..bf61cce10c 100644 --- a/includes/specials/SpecialBlockList.php +++ b/includes/specials/SpecialBlockList.php @@ -37,7 +37,7 @@ class SpecialBlockList extends SpecialPage { /** * Main execution point * - * @param string $par title fragment + * @param string $par Title fragment */ public function execute( $par ) { $this->setHeaders(); @@ -217,8 +217,8 @@ class BlockListPager extends TablePager { protected $page; /** - * @param $page SpecialPage - * @param $conds Array + * @param SpecialPage $page + * @param array $conds */ function __construct( $page, $conds ) { $this->page = $page; @@ -461,8 +461,8 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField { * 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 ) { diff --git a/includes/specials/SpecialCachedPage.php b/includes/specials/SpecialCachedPage.php index 39305f01da..7763166ac6 100644 --- a/includes/specials/SpecialCachedPage.php +++ b/includes/specials/SpecialCachedPage.php @@ -52,7 +52,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * If the cache is enabled or not. * * @since 1.20 - * @var boolean + * @var bool */ protected $cacheEnabled = true; @@ -61,7 +61,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * * @since 1.20 * - * @param $subPage string|null + * @param string|null $subPage */ protected function afterExecute( $subPage ) { $this->saveCache(); @@ -73,7 +73,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * 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 ); @@ -85,8 +85,8 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * * @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 ) ) { @@ -162,7 +162,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * * @since 1.20 * - * @param integer $cacheExpiry + * @param int $cacheExpiry */ public function setExpiry( $cacheExpiry ) { $this->cacheHelper->setExpiry( $cacheExpiry ); @@ -187,7 +187,7 @@ abstract class SpecialCachedPage extends SpecialPage implements ICacheHelper { * * @since 1.20 * - * @param boolean $hasCached + * @param bool $hasCached */ public function onCacheInitialized( $hasCached ) { if ( $hasCached ) { diff --git a/includes/specials/SpecialChangeEmail.php b/includes/specials/SpecialChangeEmail.php index e678259100..07a2a86277 100644 --- a/includes/specials/SpecialChangeEmail.php +++ b/includes/specials/SpecialChangeEmail.php @@ -45,7 +45,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { } /** - * @return Bool + * @return bool */ function isListed() { global $wgAuth; @@ -55,6 +55,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { /** * Main execution point + * @param string $par */ function execute( $par ) { global $wgAuth; @@ -114,7 +115,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { } /** - * @param $type string + * @param string $type */ protected function doReturnTo( $type = 'hard' ) { $titleObj = Title::newFromText( $this->getRequest()->getVal( 'returnto' ) ); @@ -129,7 +130,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { } /** - * @param $msg string + * @param string $msg */ protected function error( $msg ) { $this->getOutput()->wrapWikiMsg( "

\n$1\n

", $msg ); @@ -181,7 +182,7 @@ class SpecialChangeEmail extends UnlistedSpecialPage { } /** - * @param $fields array + * @param array $fields * @return string */ protected function pretty( $fields ) { @@ -215,10 +216,10 @@ class SpecialChangeEmail extends UnlistedSpecialPage { } /** - * @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; diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php index fc6b0c58c2..da1a54cd04 100644 --- a/includes/specials/SpecialComparePages.php +++ b/includes/specials/SpecialComparePages.php @@ -43,8 +43,8 @@ class SpecialComparePages extends SpecialPage { /** * Show a form for filtering namespace and username * - * @param $par String - * @return String + * @param string $par + * @return string */ public function execute( $par ) { $this->setHeaders(); diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 2c91805ef5..6a4467c127 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -237,8 +237,8 @@ class SpecialContributions extends IncludableSpecialPage { /** * 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. */ @@ -295,9 +295,9 @@ class SpecialContributions extends IncludableSpecialPage { /** * 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 ) { @@ -381,7 +381,7 @@ class SpecialContributions extends IncludableSpecialPage { /** * Generates the namespace selector form with hidden attributes. - * @return String: HTML fragment + * @return string HTML fragment */ protected function getForm() { global $wgScript; @@ -707,9 +707,9 @@ class ContribsPager extends ReverseChronologicalPager { * 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 ) { @@ -944,7 +944,7 @@ class ContribsPager extends ReverseChronologicalPager { * 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 ) { diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 31152154dd..5bec95bd48 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -147,7 +147,7 @@ class DeletedContribsPager extends IndexPager { * 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 ) { @@ -375,8 +375,8 @@ class DeletedContributionsPage extends SpecialPage { /** * 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 ) { @@ -498,7 +498,7 @@ class DeletedContributionsPage extends SpecialPage { /** * 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 ) { diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index 31fcc61aeb..0c860a5b9d 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -56,7 +56,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { /** * Main execution point * - * @param $mode int + * @param int $mode */ public function execute( $mode ) { $this->setHeaders(); @@ -113,7 +113,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * 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 ) { @@ -197,8 +197,8 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * $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(); @@ -319,7 +319,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * @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 @@ -390,7 +390,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * $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 ); @@ -426,7 +426,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * $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 ); @@ -550,7 +550,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { /** * 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 ) { @@ -615,8 +615,8 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * 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 ) { @@ -640,7 +640,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { * 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 ) { @@ -700,7 +700,7 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField { * * @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. :) diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index fbddfbdd86..0062211611 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -176,7 +176,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { * 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 == '' ) { @@ -206,9 +206,9 @@ class SpecialEmailUser extends UnlistedSpecialPage { /** * 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; @@ -252,8 +252,8 @@ class SpecialEmailUser extends UnlistedSpecialPage { /** * 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; @@ -283,8 +283,8 @@ class SpecialEmailUser extends UnlistedSpecialPage { * 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 ) { @@ -298,7 +298,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { * * @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 ) { diff --git a/includes/specials/SpecialExpandTemplates.php b/includes/specials/SpecialExpandTemplates.php index 61925cf2ff..f89f03cc75 100644 --- a/includes/specials/SpecialExpandTemplates.php +++ b/includes/specials/SpecialExpandTemplates.php @@ -29,16 +29,16 @@ */ 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 tags in the expanded wikitext */ + /** @var bool Whether or not to remove tags in the expanded wikitext */ protected $removeNowiki; /** @var maximum size in bytes to include. 50MB allows fixing those huge pages */ diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 6fb5e8c1b0..487d979015 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -297,10 +297,10 @@ class SpecialExport extends SpecialPage { * 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 ) { @@ -397,7 +397,7 @@ class SpecialExport extends SpecialPage { } /** - * @param $title Title + * @param Title $title * @return array */ private function getPagesFromCategory( $title ) { @@ -430,7 +430,7 @@ class SpecialExport extends SpecialPage { } /** - * @param $nsindex int + * @param int $nsindex * @return array */ private function getPagesFromNamespace( $nsindex ) { @@ -463,9 +463,9 @@ class SpecialExport extends SpecialPage { /** * 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, @@ -477,7 +477,7 @@ class SpecialExport extends SpecialPage { /** * Validate link depth setting, if available. - * @param $depth int + * @param int $depth * @return int */ private function validateLinkDepth( $depth ) { @@ -504,9 +504,9 @@ class SpecialExport extends SpecialPage { /** * 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 ) { @@ -525,8 +525,8 @@ class SpecialExport extends SpecialPage { /** * 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 */ diff --git a/includes/specials/SpecialFewestrevisions.php b/includes/specials/SpecialFewestrevisions.php index 47a4d75fc4..dc9d57c2ee 100644 --- a/includes/specials/SpecialFewestrevisions.php +++ b/includes/specials/SpecialFewestrevisions.php @@ -71,7 +71,7 @@ class FewestrevisionsPage extends QueryPage { /** * @param Skin $skin * @param object $result Database row - * @return String + * @return string */ function formatResult( $skin, $result ) { global $wgContLang; diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 1bd4228ec6..aca8c9637c 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -413,8 +413,8 @@ class ImportReporter extends ContextSource { /** * @param WikiImporter $importer - * @param $upload - * @param $interwiki + * @param bool $upload + * @param string $interwiki * @param string|bool $reason */ function __construct( $importer, $upload, $interwiki, $reason = false ) { @@ -448,8 +448,8 @@ class ImportReporter extends ContextSource { * @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 ) { diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index 5995347350..c44e8e1c59 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -177,8 +177,8 @@ class LinkSearchPage extends QueryPage { /** * 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 */ diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 9f0d127c4b..f9caff6e43 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -121,7 +121,7 @@ class ImageListPager extends TablePager { * 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 ) { @@ -154,7 +154,7 @@ class ImageListPager extends TablePager { } /** - * @return Array + * @return array */ function getFieldNames() { if ( !$this->mFieldNames ) { @@ -226,7 +226,7 @@ class ImageListPager extends TablePager { * * 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 ) { @@ -291,6 +291,9 @@ class ImageListPager extends TablePager { * @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; @@ -326,10 +329,10 @@ class ImageListPager extends TablePager { * * 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 ) { diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index f69e177104..367adefcb8 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -35,9 +35,9 @@ 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 ) { @@ -92,7 +92,7 @@ class UsersPager extends AlphabeticPager { } /** - * @return Array + * @return array */ function getQueryInfo() { $dbr = wfGetDB( DB_SLAVE ); @@ -154,8 +154,8 @@ class UsersPager extends AlphabeticPager { } /** - * @param $row Object - * @return String + * @param stdClass $row + * @return string */ function formatRow( $row ) { if ( $row->user_id == 0 ) { #Bug 16487 @@ -333,7 +333,7 @@ class UsersPager extends AlphabeticPager { /** * 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 ) { @@ -346,7 +346,7 @@ class UsersPager extends AlphabeticPager { /** * Format a link to a group description page * - * @param string $group group name + * @param string $group Group name * @param string $username Username * @return string */ diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 5265403f3c..dd5ab939a0 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -218,7 +218,7 @@ class SpecialLog extends SpecialPage { /** * Set page title and show header for this log type - * @param $type string + * @param string $type * @since 1.19 */ protected function addHeader( $type ) { diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index 50af9159d9..013fc2656d 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -166,7 +166,7 @@ class MIMEsearchPage extends QueryPage { } /** - * @param $type string + * @param string $type * @return bool */ protected static function isValidType( $type ) { diff --git a/includes/specials/SpecialMostinterwikis.php b/includes/specials/SpecialMostinterwikis.php index 98dd68e9d2..30ccbe5a06 100644 --- a/includes/specials/SpecialMostinterwikis.php +++ b/includes/specials/SpecialMostinterwikis.php @@ -92,8 +92,8 @@ class MostinterwikisPage extends QueryPage { } /** - * @param $skin Skin - * @param $result + * @param Skin $skin + * @param object $result * @return string */ function formatResult( $skin, $result ) { diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index 37593bf908..99f0ecf5ed 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -93,9 +93,9 @@ class MostlinkedPage extends QueryPage { /** * 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() ); diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index c90acb1f9a..8ee583be09 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -36,7 +36,7 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Is this report expensive, i.e should it be cached? * - * @return Boolean + * @return bool */ public function isExpensive() { return true; @@ -45,7 +45,7 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Is there a feed available? * - * @return Boolean + * @return bool */ public function isSyndicated() { return false; @@ -54,7 +54,7 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Sort the results in descending order? * - * @return Boolean + * @return bool */ public function sortDescending() { return true; @@ -76,7 +76,7 @@ class MostlinkedTemplatesPage extends QueryPage { /** * Pre-cache page existence to speed up link generation * - * @param $db DatabaseBase connection + * @param DatabaseBase $db * @param ResultWrapper $res */ public function preprocessResults( $db, $res ) { @@ -125,7 +125,7 @@ class MostlinkedTemplatesPage extends QueryPage { * * @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() ); diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 1e631f9939..66ec693cd5 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -124,8 +124,8 @@ class SpecialNewpages extends IncludableSpecialPage { /** * 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(); @@ -301,7 +301,7 @@ class SpecialNewpages extends IncludableSpecialPage { * size, user links, and a comment * * @param object $result Result row - * @return String + * @return string */ public function formatRow( $result ) { $title = Title::newFromRow( $result ); @@ -401,7 +401,7 @@ class SpecialNewpages extends IncludableSpecialPage { * 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 ); @@ -410,7 +410,7 @@ class SpecialNewpages extends IncludableSpecialPage { /** * Output a subscription feed listing recent edits to this page. * - * @param $type String + * @param string $type */ protected function feed( $type ) { global $wgFeed, $wgFeedClasses, $wgFeedLimit; diff --git a/includes/specials/SpecialPasswordReset.php b/includes/specials/SpecialPasswordReset.php index 082eed0d0a..14f3ccd3d6 100644 --- a/includes/specials/SpecialPasswordReset.php +++ b/includes/specials/SpecialPasswordReset.php @@ -135,10 +135,10 @@ class SpecialPasswordReset extends FormSpecialPage { * 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; @@ -349,7 +349,7 @@ class SpecialPasswordReset extends FormSpecialPage { /** * Hide the password reset page if resets are disabled. - * @return Bool + * @return bool */ function isListed() { if ( $this->canChangePassword( $this->getUser() ) === true ) { diff --git a/includes/specials/SpecialPrefixindex.php b/includes/specials/SpecialPrefixindex.php index 7ad39d2718..7bd98966d6 100644 --- a/includes/specials/SpecialPrefixindex.php +++ b/includes/specials/SpecialPrefixindex.php @@ -47,7 +47,7 @@ class SpecialPrefixindex extends SpecialAllpages { /** * 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; @@ -96,8 +96,8 @@ class SpecialPrefixindex extends SpecialAllpages { /** * 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 = '' ) { @@ -153,9 +153,9 @@ class SpecialPrefixindex extends SpecialAllpages { } /** - * @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; diff --git a/includes/specials/SpecialProtectedpages.php b/includes/specials/SpecialProtectedpages.php index 5b4ccb5ad5..6edf2c00d0 100644 --- a/includes/specials/SpecialProtectedpages.php +++ b/includes/specials/SpecialProtectedpages.php @@ -99,7 +99,7 @@ class SpecialProtectedpages extends SpecialPage { * @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 @@ -131,8 +131,8 @@ class SpecialProtectedpages extends SpecialPage { * 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;' ), @@ -220,7 +220,7 @@ class SpecialProtectedpages extends SpecialPage { /** * 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 ) { @@ -249,7 +249,7 @@ class SpecialProtectedpages extends SpecialPage { /** * 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 ) { diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index c3ebd807dc..cb6ec3c9f7 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -126,9 +126,9 @@ class SpecialProtectedtitles extends SpecialPage { } /** - * @param $namespace Integer: - * @param $type string - * @param $level string + * @param int $namespace + * @param string $type + * @param string $level * @return string * @private */ @@ -152,7 +152,7 @@ class SpecialProtectedtitles extends SpecialPage { * 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 ) { diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index e877b4e39f..2707916203 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -127,7 +127,7 @@ class SpecialRandomInCategory extends SpecialPage { /** * 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. @@ -177,7 +177,7 @@ class SpecialRandomInCategory extends SpecialPage { * 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 ? '>=' : '<='; @@ -238,7 +238,7 @@ class SpecialRandomInCategory extends SpecialPage { * 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 ) { @@ -268,8 +268,8 @@ class SpecialRandomInCategory extends SpecialPage { * @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 ); diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index 086193e14a..24b363def5 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -80,7 +80,7 @@ class RandomPage extends SpecialPage { /** * Get a comma-delimited list of namespaces we don't have * any pages in - * @return String + * @return string */ private function getNsList() { global $wgContLang; @@ -98,7 +98,7 @@ class RandomPage extends SpecialPage { /** * 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(); diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index c10b7a67aa..4edf33c748 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -43,19 +43,19 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { /** @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 */ @@ -278,6 +278,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { /** * 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(); @@ -335,6 +336,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { /** * Get the list object for this request + * @return RevDel_List */ protected function getList() { if ( is_null( $this->revDelList ) ) { @@ -462,7 +464,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { } /** - * @return String: HTML + * @return string HTML */ protected function buildCheckBoxes() { $html = ''; @@ -605,9 +607,9 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { /** * 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 ) { diff --git a/includes/specials/SpecialRunJobs.php b/includes/specials/SpecialRunJobs.php index 104cd54db0..10e7009d9b 100644 --- a/includes/specials/SpecialRunJobs.php +++ b/includes/specials/SpecialRunJobs.php @@ -117,7 +117,7 @@ class SpecialRunJobs extends UnlistedSpecialPage { * * @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 ) { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 949b86337f..61bb1cd873 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -41,13 +41,13 @@ class SpecialSearch extends SpecialPage { /** @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; /** @@ -74,7 +74,7 @@ class SpecialSearch extends SpecialPage { /** * Entry point * - * @param string $par or null + * @param string $par */ public function execute( $par ) { $this->setHeaders(); @@ -162,7 +162,7 @@ class SpecialSearch extends SpecialPage { /** * 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 ); @@ -200,7 +200,7 @@ class SpecialSearch extends SpecialPage { } /** - * @param $term String + * @param string $term */ public function showResults( $term ) { global $wgDisableTextSearch, $wgSearchForwardUrl, $wgContLang, $wgScript; @@ -419,10 +419,10 @@ class SpecialSearch extends SpecialPage { } /** - * @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 @@ -459,7 +459,7 @@ class SpecialSearch extends SpecialPage { } /** - * @param $term string + * @param string $term */ protected function setupPage( $term ) { # Should advanced UI be used? @@ -480,8 +480,8 @@ class SpecialSearch extends SpecialPage { * 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(); @@ -497,7 +497,7 @@ class SpecialSearch extends SpecialPage { /** * Reconstruct the 'power search' options for links * - * @return Array + * @return array */ protected function powerSearchOptions() { $opt = array(); @@ -515,7 +515,7 @@ class SpecialSearch extends SpecialPage { /** * Show whole set of results * - * @param $matches SearchResultSet + * @param SearchResultSet $matches * * @return string */ @@ -542,8 +542,8 @@ class SpecialSearch extends SpecialPage { /** * 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 */ @@ -722,8 +722,8 @@ class SpecialSearch extends SpecialPage { /** * Show results from other wikis * - * @param $matches SearchResultSet|array - * @param $query String + * @param SearchResultSet|array $matches + * @param string $query * * @return string */ @@ -772,9 +772,9 @@ class SpecialSearch extends SpecialPage { /** * 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 @@ -847,9 +847,9 @@ class SpecialSearch extends SpecialPage { } /** - * @param $profile - * @param $term - * @return String + * @param string $profile + * @param string $term + * @return string */ protected function getProfileForm( $profile, $term ) { // Hidden stuff @@ -869,9 +869,9 @@ class SpecialSearch extends SpecialPage { /** * 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; @@ -998,9 +998,9 @@ class SpecialSearch extends SpecialPage { } /** - * @param $term - * @param $resultsShown - * @param $totalNum + * @param string $term + * @param int $resultsShown + * @param int $totalNum * @return string */ protected function formHeader( $term, $resultsShown, $totalNum ) { @@ -1072,7 +1072,7 @@ class SpecialSearch extends SpecialPage { } /** - * @param $term string + * @param string $term * @return string */ protected function shortDialog( $term ) { @@ -1097,12 +1097,12 @@ class SpecialSearch extends SpecialPage { /** * 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; @@ -1131,8 +1131,8 @@ class SpecialSearch extends SpecialPage { /** * 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; @@ -1148,8 +1148,8 @@ class SpecialSearch extends SpecialPage { /** * 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 ) { @@ -1199,8 +1199,8 @@ class SpecialSearch extends SpecialPage { * 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; diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index dffa7de758..782d9a175a 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -58,7 +58,7 @@ class ShortPagesPage extends QueryPage { } /** - * @param $db DatabaseBase + * @param DatabaseBase $db * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index 3a2b0c6aea..ac6aaf6614 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -144,7 +144,7 @@ class SpecialUnblock extends SpecialPage { * 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() ); @@ -153,10 +153,10 @@ class SpecialUnblock extends SpecialPage { /** * 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(); diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 55ab32dc89..6d6b2c1c09 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -331,7 +331,7 @@ class PageArchive { /** * Quick check if any archived revisions are present for the page. * - * @return boolean + * @return bool */ function isDeleted() { $dbr = wfGetDB( DB_SLAVE ); @@ -439,7 +439,7 @@ class PageArchive { * @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; @@ -1147,6 +1147,7 @@ class SpecialUndelete extends SpecialPage { /** * Show a form confirming whether a tokenless user really wants to see a file + * @param string $key */ private function showFileConfirmationForm( $key ) { $out = $this->getOutput(); @@ -1174,6 +1175,7 @@ class SpecialUndelete extends SpecialPage { /** * Show a deleted file version requested by the visitor. + * @param string $key */ private function showFile( $key ) { $this->getOutput()->disable(); @@ -1539,7 +1541,7 @@ class SpecialUndelete extends SpecialPage { * @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 */ diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index b46f942e2a..01c0aaf6f6 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -32,7 +32,7 @@ class SpecialUpload extends SpecialPage { /** * 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' ); @@ -133,8 +133,8 @@ class SpecialUpload extends SpecialPage { * 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 ); @@ -142,6 +142,7 @@ class SpecialUpload extends SpecialPage { /** * Special page entry point + * @param string $par */ public function execute( $par ) { $this->setHeaders(); @@ -202,7 +203,7 @@ class SpecialUpload extends SpecialPage { /** * 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 @@ -221,8 +222,8 @@ class SpecialUpload extends SpecialPage { * 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 ) { @@ -328,9 +329,9 @@ class SpecialUpload extends SpecialPage { * 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. @@ -535,7 +536,7 @@ class SpecialUpload extends SpecialPage { * * 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' ) ) { @@ -563,7 +564,7 @@ class SpecialUpload extends SpecialPage { /** * 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 ) { @@ -642,7 +643,7 @@ class SpecialUpload extends SpecialPage { /** * Remove a temporarily kept file stashed by saveTempUploadedFile(). * - * @return Boolean: success + * @return bool Success */ protected function unsaveUploadedFile() { if ( !( $this->mUpload instanceof UploadFromStash ) ) { @@ -664,8 +665,8 @@ class SpecialUpload extends SpecialPage { * 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 ) { @@ -716,7 +717,7 @@ class SpecialUpload extends SpecialPage { /** * Construct a warning and a gallery from an array of duplicate files. - * @param $dupes array + * @param array $dupes * @return string */ public function getDupeWarning( $dupes ) { @@ -807,7 +808,7 @@ class UploadForm extends HTMLForm { * 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; @@ -901,7 +902,7 @@ class UploadForm extends HTMLForm { /** * 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 @@ -947,7 +948,7 @@ class UploadForm extends HTMLForm { * 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 ) { @@ -1045,7 +1046,7 @@ class UploadForm extends HTMLForm { * 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(); @@ -1144,7 +1145,7 @@ class UploadForm extends HTMLForm { class UploadSourceField extends HTMLTextField { /** - * @param $cellAttributes array + * @param array $cellAttributes * @return string */ function getLabelHtml( $cellAttributes = array() ) { diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 33883b0d01..75ab19f12e 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -59,7 +59,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * * @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(); @@ -153,10 +153,10 @@ class SpecialUploadStash extends UnlistedSpecialPage { /** * 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 @@ -177,11 +177,11 @@ class SpecialUploadStash extends UnlistedSpecialPage { /** * 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 @@ -227,7 +227,7 @@ class SpecialUploadStash extends UnlistedSpecialPage { * @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 @@ -294,8 +294,8 @@ class SpecialUploadStash extends UnlistedSpecialPage { /** * 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 */ diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 9a2e194b99..4006e49bfc 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -166,7 +166,7 @@ class LoginForm extends SpecialPage { } /* - * @param $subPage string|null + * @param string|null $subPage */ public function execute( $subPage ) { if ( session_id() == '' ) { @@ -536,9 +536,9 @@ class LoginForm extends SpecialPage { * 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 ) { @@ -720,7 +720,7 @@ class LoginForm extends SpecialPage { * 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; @@ -762,9 +762,9 @@ class LoginForm extends SpecialPage { * 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; @@ -948,11 +948,11 @@ class LoginForm extends SpecialPage { } /** - * @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' @@ -1037,9 +1037,9 @@ class LoginForm extends SpecialPage { /** * 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(); @@ -1058,7 +1058,7 @@ class LoginForm extends SpecialPage { * 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 ) { @@ -1094,7 +1094,7 @@ class LoginForm extends SpecialPage { * 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 @@ -1115,7 +1115,7 @@ class LoginForm extends SpecialPage { /** * 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 @@ -1344,7 +1344,7 @@ class LoginForm extends SpecialPage { * 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 ) { @@ -1375,7 +1375,7 @@ class LoginForm extends SpecialPage { /** * Get the login token from the current session - * @return Mixed + * @return mixed */ public static function getLoginToken() { global $wgRequest; @@ -1403,7 +1403,7 @@ class LoginForm extends SpecialPage { /** * Get the createaccount token from the current session - * @return Mixed + * @return mixed */ public static function getCreateaccountToken() { global $wgRequest; diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 29266cacab..8a5ba1d648 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -190,8 +190,8 @@ class UserrightsPage extends SpecialPage { * 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 */ @@ -278,6 +278,10 @@ class UserrightsPage extends SpecialPage { /** * 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' ); @@ -294,7 +298,7 @@ class UserrightsPage extends SpecialPage { /** * 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 ); @@ -321,7 +325,7 @@ class UserrightsPage extends SpecialPage { * * Side effects: error output for invalid access * @param string $username - * @return Status object + * @return Status */ public function fetchUser( $username ) { global $wgUserrightsInterwikiDelimiter; @@ -396,7 +400,7 @@ class UserrightsPage extends SpecialPage { * 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 ) { @@ -572,7 +576,7 @@ class UserrightsPage extends SpecialPage { /** * Format a link to a group description page * - * @param $group string + * @param string $group * @return string */ private static function buildGroupLink( $group ) { @@ -582,7 +586,7 @@ class UserrightsPage extends SpecialPage { /** * Format a link to a group member description page * - * @param $group string + * @param string $group * @return string */ private static function buildGroupMemberLink( $group ) { @@ -601,8 +605,8 @@ class UserrightsPage extends SpecialPage { * 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 ) { @@ -696,7 +700,7 @@ class UserrightsPage extends SpecialPage { } /** - * @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 ) { @@ -725,8 +729,8 @@ class UserrightsPage extends SpecialPage { /** * 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' ); diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index dee44cd2e7..e61d17a886 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -165,7 +165,7 @@ class SpecialVersion extends SpecialPage { /** * Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text * - * @return String + * @return string */ public static function getCopyrightAndAuthorList() { global $wgLang; @@ -240,7 +240,7 @@ class SpecialVersion extends SpecialPage { /** * 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 = '' ) { @@ -409,7 +409,7 @@ class SpecialVersion extends SpecialPage { * * @since 1.17 * - * @param $type String + * @param string $type * * @return string */ @@ -530,8 +530,8 @@ class SpecialVersion extends SpecialPage { * * @since 1.17 * - * @param $type String - * @param $message String + * @param string $type + * @param string $message * * @return string */ @@ -555,8 +555,8 @@ class SpecialVersion extends SpecialPage { /** * Callback to sort extensions by type. - * @param $a array - * @param $b array + * @param array $a + * @param array $b * @return int */ function compare( $a, $b ) { @@ -582,9 +582,9 @@ class SpecialVersion extends SpecialPage { * - 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(); @@ -975,7 +975,7 @@ class SpecialVersion extends SpecialPage { /** * 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 @@ -1014,7 +1014,7 @@ class SpecialVersion extends SpecialPage { * 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 ) { @@ -1087,7 +1087,7 @@ class SpecialVersion extends SpecialPage { /** * 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 */ @@ -1104,8 +1104,8 @@ class SpecialVersion extends SpecialPage { } /** - * @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 ); diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 1345b76345..fc39ef538b 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -120,7 +120,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { * 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 ) { @@ -577,7 +577,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { * 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