From 9c614ac02d884abc110146d520cc842998d85e6a Mon Sep 17 00:00:00 2001 From: umherirrender Date: Mon, 14 Apr 2014 21:43:18 +0200 Subject: [PATCH] Fixed some @params documentation 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. Change-Id: I8c9f30128b46086064326708a4878228ba459447 --- img_auth.php | 4 +- includes/changes/ChangesList.php | 58 ++++---- includes/changes/RCCacheEntry.php | 2 +- includes/changes/RCCacheEntryFactory.php | 10 +- includes/changes/RecentChange.php | 139 +++++++++--------- includes/context/ContextSource.php | 2 +- includes/context/IContextSource.php | 2 +- includes/context/RequestContext.php | 4 +- includes/deferred/LinksUpdate.php | 14 +- includes/diff/DiffFormatter.php | 4 +- includes/exception/HttpError.php | 6 +- includes/exception/MWException.php | 16 +- includes/exception/MWExceptionHandler.php | 4 +- includes/externalstore/ExternalStore.php | 6 +- includes/externalstore/ExternalStoreDB.php | 22 +-- .../externalstore/ExternalStoreMedium.php | 6 +- includes/gallery/ImageGalleryBase.php | 10 +- includes/rcfeed/RCFeedEngine.php | 6 +- thumb.php | 16 +- 19 files changed, 166 insertions(+), 165 deletions(-) diff --git a/img_auth.php b/img_auth.php index a0976af3b0..e139227eba 100644 --- a/img_auth.php +++ b/img_auth.php @@ -163,8 +163,8 @@ function wfImageAuthMain() { * Issue a standard HTTP 403 Forbidden header ($msg1-a message index, not a message) and an * error message ($msg2, also a message index), (both required) then end the script * subsequent arguments to $msg2 will be passed as parameters only for replacing in $msg2 - * @param $msg1 - * @param $msg2 + * @param string $msg1 + * @param string $msg2 */ function wfForbidden( $msg1, $msg2 ) { global $wgImgAuthDetails; diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 99b60bbf05..69e1e9ea5d 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -57,7 +57,7 @@ class ChangesList extends ContextSource { * Some users might want to use an enhanced list format, for instance * * @param IContextSource $context - * @return ChangesList derivative + * @return ChangesList */ public static function newFromContext( IContextSource $context ) { $user = $context->getUser(); @@ -74,14 +74,14 @@ class ChangesList extends ContextSource { /** * Sets the list to use a "
  • " tag - * @param $value Boolean + * @param bool $value */ public function setWatchlistDivs( $value = true ) { $this->watchlist = $value; } /** - * @return bool true when setWatchlistDivs has been called + * @return bool True when setWatchlistDivs has been called * @since 1.23 */ public function isWatchlist() { @@ -106,7 +106,7 @@ class ChangesList extends ContextSource { /** * Returns the appropriate flags for new page, minor change and patrolling * @param array $flags Associative array of 'flag' => Bool - * @param string $nothing to use for empty space + * @param string $nothing To use for empty space * @return string */ public function recentChangesFlags( $flags, $nothing = ' ' ) { @@ -236,8 +236,8 @@ class ChangesList extends ContextSource { /** * Format the character difference of one or several changes. * - * @param $old RecentChange - * @param $new RecentChange last change to use, if not provided, $old will be used + * @param RecentChange $old + * @param RecentChange $new Last change to use, if not provided, $old will be used * @return string HTML fragment */ public function formatCharacterDifference( RecentChange $old, RecentChange $new = null ) { @@ -258,7 +258,7 @@ class ChangesList extends ContextSource { /** * Returns text for the end of RC - * @return String + * @return string */ public function endRecentChangesList() { $out = $this->rclistOpen ? "\n" : ''; @@ -269,7 +269,7 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc_timestamp mixed + * @param mixed $rc_timestamp */ public function insertDateHeader( &$s, $rc_timestamp ) { # Make date header if necessary @@ -286,8 +286,8 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $title Title - * @param $logtype string + * @param Title $title + * @param string $logtype */ public function insertLog( &$s, $title, $logtype ) { $page = new LogPage( $logtype ); @@ -297,8 +297,8 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc RecentChange - * @param $unpatrolled + * @param RecentChange $rc + * @param bool $unpatrolled */ public function insertDiffHist( &$s, &$rc, $unpatrolled ) { # Diff link @@ -338,9 +338,9 @@ class ChangesList extends ContextSource { /** * @param string $s HTML to update - * @param $rc RecentChange - * @param $unpatrolled - * @param $watched + * @param RecentChange $rc + * @param bool $unpatrolled + * @param bool $watched */ public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) { $params = array(); @@ -369,7 +369,7 @@ class ChangesList extends ContextSource { * Get the timestamp from $rc formatted with current user's settings * and a separator * - * @param $rc RecentChange + * @param RecentChange $rc * @return string HTML fragment */ public function getTimestamp( $rc ) { @@ -385,7 +385,7 @@ class ChangesList extends ContextSource { * Insert time timestamp string from $rc into $s * * @param string $s HTML to update - * @param $rc RecentChange + * @param RecentChange $rc */ public function insertTimestamp( &$s, $rc ) { $s .= $this->getTimestamp( $rc ); @@ -394,8 +394,8 @@ class ChangesList extends ContextSource { /** * Insert links to user page, user talk page and eventually a blocking link * - * @param &$s String HTML to update - * @param &$rc RecentChange + * @param string &$s HTML to update + * @param RecentChange &$rc */ public function insertUserRelatedLinks( &$s, &$rc ) { if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { @@ -411,7 +411,7 @@ class ChangesList extends ContextSource { /** * Insert a formatted action * - * @param $rc RecentChange + * @param RecentChange $rc * @return string */ public function insertLogEntry( $rc ) { @@ -425,7 +425,7 @@ class ChangesList extends ContextSource { /** * Insert a formatted comment - * @param $rc RecentChange + * @param RecentChange $rc * @return string */ public function insertComment( $rc ) { @@ -445,7 +445,7 @@ class ChangesList extends ContextSource { * Check whether to enable recent changes patrol features * * @deprecated since 1.22 - * @return Boolean + * @return bool */ public static function usePatrol() { global $wgUser; @@ -501,8 +501,8 @@ class ChangesList extends ContextSource { } /** - * @param $link string - * @param $watched bool + * @param string $link + * @param bool $watched * @return string */ protected function maybeWatchedLink( $link, $watched = false ) { @@ -515,8 +515,8 @@ class ChangesList extends ContextSource { /** Inserts a rollback link * - * @param $s string - * @param $rc RecentChange + * @param string $s + * @param RecentChange $rc */ public function insertRollback( &$s, &$rc ) { if ( $rc->mAttribs['rc_type'] == RC_EDIT @@ -542,9 +542,9 @@ class ChangesList extends ContextSource { } /** - * @param $s string - * @param $rc RecentChange - * @param $classes + * @param string $s + * @param RecentChange $rc + * @param array $classes */ public function insertTags( &$s, &$rc, &$classes ) { if ( empty( $rc->mAttribs['ts_tags'] ) ) { diff --git a/includes/changes/RCCacheEntry.php b/includes/changes/RCCacheEntry.php index 07a9409107..d9cafbc309 100644 --- a/includes/changes/RCCacheEntry.php +++ b/includes/changes/RCCacheEntry.php @@ -30,7 +30,7 @@ class RCCacheEntry extends RecentChange { public $watched; /** - * @param $rc RecentChange + * @param RecentChange $rc * @return RCCacheEntry */ static function newFromParent( $rc ) { diff --git a/includes/changes/RCCacheEntryFactory.php b/includes/changes/RCCacheEntryFactory.php index 3e289cf4d6..25a572bdec 100644 --- a/includes/changes/RCCacheEntryFactory.php +++ b/includes/changes/RCCacheEntryFactory.php @@ -39,7 +39,7 @@ class RCCacheEntryFactory { /** * @param RecentChange $baseRC - * @param boolean $watched + * @param bool $watched * * @return RCCacheEntry */ @@ -83,7 +83,7 @@ class RCCacheEntryFactory { * @param RecentChange $cacheEntry * @param User $user * - * @return boolean + * @return bool */ private function showDiffLinks( RecentChange $cacheEntry, User $user ) { return ChangesList::userCan( $cacheEntry, Revision::DELETED_TEXT, $user ); @@ -163,7 +163,7 @@ class RCCacheEntryFactory { /** * @param RecentChange $cacheEntry - * @param boolean $showDiffLinks + * @param bool $showDiffLinks * @param int $counter * * @return string @@ -198,7 +198,7 @@ class RCCacheEntryFactory { /** * @param RecentChange $cacheEntry - * @param boolean $showDiffLinks + * @param bool $showDiffLinks * @param int $counter * * @return string @@ -222,7 +222,7 @@ class RCCacheEntryFactory { /** * @param RecentChange $cacheEntry - * @param boolean $showDiffLinks + * @param bool $showDiffLinks * * @return string */ diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 7705c1078c..48270477aa 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -92,7 +92,7 @@ class RecentChange { # Factory methods /** - * @param $row + * @param mixed $row * @return RecentChange */ public static function newFromRow( $row ) { @@ -105,7 +105,7 @@ class RecentChange { /** * No uses left in Gerrit on 2013-11-19. * @deprecated in 1.22 - * @param $row + * @param mixed $row * @return RecentChange */ public static function newFromCurRow( $row ) { @@ -131,9 +131,9 @@ class RecentChange { /** * Find the first recent change matching some specific conditions * - * @param array $conds of conditions - * @param $fname Mixed: override the method name in profiling/logs - * @param $options Array Query options + * @param array $conds Array of conditions + * @param mixed $fname Override the method name in profiling/logs + * @param array $options Query options * @return RecentChange */ public static function newFromConds( $conds, $fname = __METHOD__, $options = array() ) { @@ -183,21 +183,20 @@ class RecentChange { # Accessors /** - * @param $attribs array + * @param array $attribs */ public function setAttribs( $attribs ) { $this->mAttribs = $attribs; } /** - * @param $extra array + * @param array $extra */ public function setExtra( $extra ) { $this->mExtra = $extra; } /** - * * @return Title */ public function &getTitle() { @@ -227,7 +226,7 @@ class RecentChange { /** * Writes the data in this object to the database - * @param $noudp bool + * @param bool $noudp */ public function save( $noudp = false ) { global $wgPutIPinRC, $wgUseEnotif, $wgShowUpdatedMarker, $wgContLang; @@ -403,9 +402,9 @@ class RecentChange { /** * Mark a given change as patrolled * - * @param $change Mixed: RecentChange or corresponding rc_id - * @param $auto Boolean: for automatic patrol - * @return Array See doMarkPatrolled(), or null if $change is not an existing rc_id + * @param RecentChange|int $change RecentChange or corresponding rc_id + * @param bool $auto For automatic patrol + * @return array See doMarkPatrolled(), or null if $change is not an existing rc_id */ public static function markPatrolled( $change, $auto = false ) { global $wgUser; @@ -426,9 +425,9 @@ class RecentChange { * * NOTE: Can also return 'rcpatroldisabled', 'hookaborted' and * 'markedaspatrollederror-noautopatrol' as errors - * @param $user User object doing the action - * @param $auto Boolean: for automatic patrol - * @return array of permissions errors, see Title::getUserPermissionsErrors() + * @param User $user User object doing the action + * @param bool $auto For automatic patrol + * @return array Array of permissions errors, see Title::getUserPermissionsErrors() */ public function doMarkPatrolled( User $user, $auto = false ) { global $wgUseRCPatrol, $wgUseNPPatrol; @@ -469,7 +468,7 @@ class RecentChange { /** * Mark this RecentChange patrolled, without error checking - * @return Integer: number of affected rows + * @return int Number of affected rows */ public function reallyMarkPatrolled() { $dbw = wfGetDB( DB_MASTER ); @@ -493,19 +492,19 @@ class RecentChange { /** * Makes an entry in the database corresponding to an edit * - * @param $timestamp - * @param $title Title - * @param $minor - * @param $user User - * @param $comment - * @param $oldId - * @param $lastTimestamp - * @param $bot - * @param $ip string - * @param $oldSize int - * @param $newSize int - * @param $newId int - * @param $patrol int + * @param string $timestamp + * @param Title $title + * @param bool $minor + * @param User $user + * @param string $comment + * @param int $oldId + * @param string $lastTimestamp + * @param bool $bot + * @param string $ip + * @param int $oldSize + * @param int $newSize + * @param int $newId + * @param int $patrol * @return RecentChange */ public static function notifyEdit( $timestamp, &$title, $minor, &$user, $comment, $oldId, @@ -555,16 +554,16 @@ class RecentChange { * Makes an entry in the database corresponding to page creation * Note: the title object must be loaded with the new id using resetArticleID() * - * @param $timestamp - * @param $title Title - * @param $minor - * @param $user User - * @param $comment - * @param $bot - * @param $ip string - * @param $size int - * @param $newId int - * @param $patrol int + * @param string $timestamp + * @param Title $title + * @param bool $minor + * @param User $user + * @param string $comment + * @param bool $bot + * @param string $ip + * @param int $size + * @param int $newId + * @param int $patrol * @return RecentChange */ public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot, @@ -611,18 +610,18 @@ class RecentChange { } /** - * @param $timestamp - * @param $title - * @param $user - * @param $actionComment - * @param $ip string - * @param $type - * @param $action - * @param $target - * @param $logComment - * @param $params - * @param $newId int - * @param $actionCommentIRC string + * @param string $timestamp + * @param Title $title + * @param User $user + * @param string $actionComment + * @param string $ip + * @param string $type + * @param string $action + * @param Title $target + * @param string $logComment + * @param string $params + * @param int $newId + * @param string $actionCommentIRC * @return bool */ public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type, @@ -642,18 +641,18 @@ class RecentChange { } /** - * @param $timestamp - * @param $title Title - * @param $user User - * @param $actionComment - * @param $ip string - * @param $type - * @param $action - * @param $target Title - * @param $logComment - * @param $params - * @param $newId int - * @param $actionCommentIRC string + * @param string $timestamp + * @param Title $title + * @param User $user + * @param string $actionComment + * @param string $ip + * @param string $type + * @param string $action + * @param Title $target + * @param string $logComment + * @param string $params + * @param int $newId + * @param string $actionCommentIRC * @return RecentChange */ public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip, @@ -724,7 +723,7 @@ class RecentChange { /** * Initialises the members of this object from a mysql row object * - * @param $row + * @param mixed $row */ public function loadFromRow( $row ) { $this->mAttribs = get_object_vars( $row ); @@ -736,7 +735,7 @@ class RecentChange { * Makes a pseudo-RC entry from a cur row * * @deprecated in 1.22 - * @param $row + * @param mixed $row */ public function loadFromCurRow( $row ) { wfDeprecated( __METHOD__, '1.22' ); @@ -788,7 +787,7 @@ class RecentChange { /** * Gets the end part of the diff URL associated with this object * Blank if no diff link should be displayed - * @param $forceCur + * @param bool $forceCur * @return string */ public function diffLinkTrail( $forceCur ) { @@ -810,8 +809,8 @@ class RecentChange { /** * Returns the change size (HTML). * The lengths can be given optionally. - * @param $old int - * @param $new int + * @param int $old + * @param int $new * @return string */ public function getCharacterDifference( $old = 0, $new = 0 ) { @@ -873,8 +872,8 @@ class RecentChange { * as the recentchanges table might not be cleared out regularly (so older entries might exist) * or rows which will be deleted soon shouldn't be included. * - * @param $timestamp mixed MWTimestamp compatible timestamp - * @param $tolerance integer Tolerance in seconds + * @param mixed $timestamp MWTimestamp compatible timestamp + * @param int $tolerance Tolerance in seconds * @return bool */ public static function isInRCLifespan( $timestamp, $tolerance = 0 ) { diff --git a/includes/context/ContextSource.php b/includes/context/ContextSource.php index 9bc416d620..9e5505917e 100644 --- a/includes/context/ContextSource.php +++ b/includes/context/ContextSource.php @@ -183,7 +183,7 @@ abstract class ContextSource implements IContextSource { * Export the resolved user IP, HTTP headers, user ID, and session ID. * The result will be reasonably sized to allow for serialization. * - * @return Array + * @return array * @since 1.21 */ public function exportSession() { diff --git a/includes/context/IContextSource.php b/includes/context/IContextSource.php index eb513723a6..f892b025a5 100644 --- a/includes/context/IContextSource.php +++ b/includes/context/IContextSource.php @@ -118,7 +118,7 @@ interface IContextSource { * Export the resolved user IP, HTTP headers, user ID, and session ID. * The result will be reasonably sized to allow for serialization. * - * @return Array + * @return array * @since 1.21 */ public function exportSession(); diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php index aabdd9da15..6f27a7ae82 100644 --- a/includes/context/RequestContext.php +++ b/includes/context/RequestContext.php @@ -204,7 +204,7 @@ class RequestContext implements IContextSource { } /** - * @param $o OutputPage + * @param OutputPage $o */ public function setOutput( OutputPage $o ) { $this->output = $o; @@ -436,7 +436,7 @@ class RequestContext implements IContextSource { * Export the resolved user IP, HTTP headers, user ID, and session ID. * The result will be reasonably sized to allow for serialization. * - * @return Array + * @return array * @since 1.21 */ public function exportSession() { diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 6286f94684..abd44fdf36 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -269,7 +269,7 @@ class LinksUpdate extends SqlDataUpdate { } /** - * @param $cats + * @param array $cats */ function invalidateCategories( $cats ) { $this->invalidatePages( NS_CATEGORY, array_keys( $cats ) ); @@ -288,7 +288,7 @@ class LinksUpdate extends SqlDataUpdate { } /** - * @param $images + * @param array $images */ function invalidateImageDescriptions( $images ) { $this->invalidatePages( NS_FILE, array_keys( $images ) ); @@ -432,7 +432,7 @@ class LinksUpdate extends SqlDataUpdate { /** * Get an array of category insertions * - * @param array $existing mapping existing category names to sort keys. If both + * @param array $existing Mapping existing category names to sort keys. If both * match a link in $this, the link will be omitted from the output * * @return array @@ -477,7 +477,7 @@ class LinksUpdate extends SqlDataUpdate { /** * Get an array of interlanguage link insertions * - * @param array $existing mapping existing language codes to titles + * @param array $existing Mapping existing language codes to titles * * @return array */ @@ -769,7 +769,7 @@ class LinksUpdate extends SqlDataUpdate { /** * Get an array of existing categories, with the name in the key and sort key in the value. * - * @return array of property names and values + * @return array Array of property names and values */ private function getExistingProperties() { $res = $this->mDb->select( 'page_props', array( 'pp_propname', 'pp_value' ), @@ -831,7 +831,7 @@ class LinksUpdate extends SqlDataUpdate { /** * Fetch page links added by this LinksUpdate. Only available after the update is complete. * @since 1.22 - * @return null|array of Titles + * @return null|array Array of Titles */ public function getAddedLinks() { if ( $this->linkInsertions === null ) { @@ -848,7 +848,7 @@ class LinksUpdate extends SqlDataUpdate { /** * Fetch page links removed by this LinksUpdate. Only available after the update is complete. * @since 1.22 - * @return null|array of Titles + * @return null|array Array of Titles */ public function getRemovedLinks() { if ( $this->linkDeletions === null ) { diff --git a/includes/diff/DiffFormatter.php b/includes/diff/DiffFormatter.php index d8a9ba37c3..40df0d75b4 100644 --- a/includes/diff/DiffFormatter.php +++ b/includes/diff/DiffFormatter.php @@ -52,7 +52,7 @@ abstract class DiffFormatter { /** * Format a diff. * - * @param Diff $diff A Diff object. + * @param Diff $diff * * @return string The formatted output. */ @@ -125,7 +125,7 @@ abstract class DiffFormatter { * @param int $xlen * @param int $ybeg * @param int $ylen - * @param $edits + * @param array $edits * * @throws MWException If the edit type is not known. */ diff --git a/includes/exception/HttpError.php b/includes/exception/HttpError.php index f955f06b2f..6ab6e03929 100644 --- a/includes/exception/HttpError.php +++ b/includes/exception/HttpError.php @@ -31,9 +31,9 @@ class HttpError extends MWException { /** * Constructor * - * @param $httpCode Integer: HTTP status code to send to the client - * @param string|Message $content content of the message - * @param string|Message $header content of the header (\ and \) + * @param int $httpCode HTTP status code to send to the client + * @param string|Message $content Content of the message + * @param string|Message $header Content of the header (\ and \) */ public function __construct( $httpCode, $content, $header = null ) { parent::__construct( $content ); diff --git a/includes/exception/MWException.php b/includes/exception/MWException.php index 136fb89960..2b8cb00e49 100644 --- a/includes/exception/MWException.php +++ b/includes/exception/MWException.php @@ -40,7 +40,7 @@ class MWException extends Exception { * Whether to log this exception in the exception debug log. * * @since 1.23 - * @return boolean + * @return bool */ public function isLoggable() { return true; @@ -66,9 +66,9 @@ class MWException extends Exception { /** * Run hook to allow extensions to modify the text of the exception * - * @param string $name class name of the exception - * @param array $args arguments to pass to the callback functions - * @return string|null string to output or null if any hook has been called + * @param string $name Class name of the exception + * @param array $args Arguments to pass to the callback functions + * @return string|null String to output or null if any hook has been called */ public function runHooks( $name, $args = array() ) { global $wgExceptionHooks; @@ -107,11 +107,11 @@ class MWException extends Exception { /** * Get a message from i18n * - * @param string $key message name - * @param string $fallback default message if the message cache can't be + * @param string $key Message name + * @param string $fallback Default message if the message cache can't be * called by the exception * The function also has other parameters that are arguments for the message - * @return string message with arguments replaced + * @return string Message with arguments replaced */ public function msg( $key, $fallback /*[, params...] */ ) { $args = array_slice( func_get_args(), 2 ); @@ -128,7 +128,7 @@ class MWException extends Exception { * backtrace to the error, otherwise show a message to ask to set it to true * to show that information. * - * @return string html to output + * @return string Html to output */ public function getHTML() { global $wgShowExceptionDetails; diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php index 8c7f05cb8d..71917e1327 100644 --- a/includes/exception/MWExceptionHandler.php +++ b/includes/exception/MWExceptionHandler.php @@ -32,6 +32,7 @@ class MWExceptionHandler { /** * Report an exception to the user + * @param Exception $e */ protected static function report( Exception $e ) { global $wgShowExceptionDetails; @@ -130,6 +131,7 @@ class MWExceptionHandler { * } catch ( Exception $e ) { * echo $e->__toString(); * } + * @param Exception $e */ public static function handle( $e ) { global $wgFullyInitialised; @@ -313,7 +315,7 @@ class MWExceptionHandler { * @param Exception $e * @param bool $pretty Add non-significant whitespace to improve readability (default: false). * @param int $escaping Bitfield consisting of FormatJson::.*_OK class constants. - * @return string|bool: JSON string if successful; false upon failure + * @return string|bool JSON string if successful; false upon failure */ public static function jsonSerializeException( Exception $e, $pretty = false, $escaping = 0 ) { global $wgLogExceptionBacktrace; diff --git a/includes/externalstore/ExternalStore.php b/includes/externalstore/ExternalStore.php index 9e9d976de7..9e09b222b0 100644 --- a/includes/externalstore/ExternalStore.php +++ b/includes/externalstore/ExternalStore.php @@ -131,7 +131,7 @@ class ExternalStore { * class itself as a parameter. * * @param string $url A partial external store URL ("://") - * @param $data string + * @param string $data * @param array $params Associative array of ExternalStoreMedium parameters * @return string|bool The URL of the stored data item, or false on error * @throws MWException @@ -218,8 +218,8 @@ class ExternalStore { } /** - * @param $data string - * @param $wiki string + * @param string $data + * @param string $wiki * @return string|bool The URL of the stored data item, or false on error * @throws MWException */ diff --git a/includes/externalstore/ExternalStoreDB.php b/includes/externalstore/ExternalStoreDB.php index 9de81e060b..5774a24c78 100644 --- a/includes/externalstore/ExternalStoreDB.php +++ b/includes/externalstore/ExternalStoreDB.php @@ -106,8 +106,8 @@ class ExternalStoreDB extends ExternalStoreMedium { /** * Get a LoadBalancer for the specified cluster * - * @param string $cluster cluster name - * @return LoadBalancer object + * @param string $cluster Cluster name + * @return LoadBalancer */ function getLoadBalancer( $cluster ) { $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false; @@ -118,8 +118,8 @@ class ExternalStoreDB extends ExternalStoreMedium { /** * Get a slave database connection for the specified cluster * - * @param string $cluster cluster name - * @return DatabaseBase object + * @param string $cluster Cluster name + * @return DatabaseBase */ function getSlave( $cluster ) { global $wgDefaultExternalStore; @@ -140,8 +140,8 @@ class ExternalStoreDB extends ExternalStoreMedium { /** * Get a master database connection for the specified cluster * - * @param string $cluster cluster name - * @return DatabaseBase object + * @param string $cluster Cluster name + * @return DatabaseBase */ function getMaster( $cluster ) { $wiki = isset( $this->params['wiki'] ) ? $this->params['wiki'] : false; @@ -153,8 +153,8 @@ class ExternalStoreDB extends ExternalStoreMedium { /** * Get the 'blobs' table name for this database * - * @param $db DatabaseBase - * @return String: table name ('blobs' by default) + * @param DatabaseBase $db + * @return string Table name ('blobs' by default) */ function getTable( $db ) { $table = $db->getLBInfo( 'blobs table' ); @@ -169,9 +169,9 @@ class ExternalStoreDB extends ExternalStoreMedium { * Fetch a blob item out of the database; a cache of the last-loaded * blob will be kept so that multiple loads out of a multi-item blob * can avoid redundant database access and decompression. - * @param $cluster - * @param $id - * @param $itemID + * @param string $cluster + * @param string $id + * @param string $itemID * @return mixed * @private */ diff --git a/includes/externalstore/ExternalStoreMedium.php b/includes/externalstore/ExternalStoreMedium.php index a526df609c..e9c34a4d47 100644 --- a/includes/externalstore/ExternalStoreMedium.php +++ b/includes/externalstore/ExternalStoreMedium.php @@ -29,7 +29,7 @@ * @since 1.21 */ abstract class ExternalStoreMedium { - /** @var Array */ + /** @var array */ protected $params = array(); /** @@ -71,8 +71,8 @@ abstract class ExternalStoreMedium { /** * Insert a data item into a given location * - * @param string $location the location name - * @param string $data the data item + * @param string $location The location name + * @param string $data The data item * @return string|bool The URL of the stored data item, or false on error * @throws MWException */ diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index d2e4689f98..42e8c0300b 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -69,7 +69,7 @@ abstract class ImageGalleryBase extends ContextSource { * Get a new image gallery. This is the method other callers * should use to get a gallery. * - * @param string|bool $mode Mode to use. False to use the default. + * @param string|bool $mode Mode to use. False to use the default * @throws MWException */ static function factory( $mode = false ) { @@ -130,7 +130,7 @@ abstract class ImageGalleryBase extends ContextSource { * @note This also triggers using the page's target * language instead of the user language. * - * @param $parser Parser + * @param Parser $parser */ function setParser( $parser ) { $this->mParser = $parser; @@ -200,7 +200,7 @@ abstract class ImageGalleryBase extends ContextSource { * to allow extensions to add additional parameters to * parser tag. * - * @param array $options Attributes of gallery tag. + * @param array $options Attributes of gallery tag */ public function setAdditionalOptions( $options ) { } @@ -265,7 +265,7 @@ abstract class ImageGalleryBase extends ContextSource { * Enable/Disable showing of the file size of an image in the gallery. * Enabled by default. * - * @param bool $f Set to false to disable. + * @param bool $f Set to false to disable */ function setShowBytes( $f ) { $this->mShowBytes = (bool)$f; @@ -275,7 +275,7 @@ abstract class ImageGalleryBase extends ContextSource { * Enable/Disable showing of the filename of an image in the gallery. * Enabled by default. * - * @param bool $f Set to false to disable. + * @param bool $f Set to false to disable */ function setShowFilename( $f ) { $this->mShowFilename = (bool)$f; diff --git a/includes/rcfeed/RCFeedEngine.php b/includes/rcfeed/RCFeedEngine.php index 022e317521..066ecbe775 100644 --- a/includes/rcfeed/RCFeedEngine.php +++ b/includes/rcfeed/RCFeedEngine.php @@ -29,9 +29,9 @@ interface RCFeedEngine { * Sends some text to the specified live feed. * * @see RecentChange::cleanupForIRC - * @param array $feed The feed, as configured in an associative array. - * @param string $line The text to send. - * @return boolean success + * @param array $feed The feed, as configured in an associative array + * @param string $line The text to send + * @return bool success */ public function send( array $feed, $line ); } diff --git a/thumb.php b/thumb.php index b0d9f10edd..3f8e0d3fe3 100644 --- a/thumb.php +++ b/thumb.php @@ -88,7 +88,7 @@ function wfThumbHandle404() { /** * Stream a thumbnail specified by parameters * - * @param $params Array List of thumbnailing parameters. In addition to parameters + * @param array $params List of thumbnailing parameters. In addition to parameters * passed to the MediaHandler, this may also includes the keys: * f (for filename), archived (if archived file), temp (if temp file), * w (alias for width), p (alias for page), r (ignored; historical), @@ -400,8 +400,8 @@ function wfThumbAttemptKey( File $img, $thumbName ) { * * Transform specific parameters are set later via wfExtractThumbParams(). * - * @param $thumbRel String Thumbnail path relative to the thumb zone - * @return Array|null associative params array or null + * @param string $thumbRel Thumbnail path relative to the thumb zone + * @return array|null Associative params array or null */ function wfExtractThumbRequestInfo( $thumbRel ) { $repo = RepoGroup::singleton()->getLocalRepo(); @@ -437,9 +437,9 @@ function wfExtractThumbRequestInfo( $thumbRel ) { * Convert a thumbnail name (122px-foo.png) to parameters, using * file handler. * - * @param File $file File object for file in question. - * @param $param Array Array of parameters so far. - * @return Array parameters array with more parameters. + * @param File $file File object for file in question + * @param array $param Array of parameters so far + * @return array Parameters array with more parameters */ function wfExtractThumbParams( $file, $params ) { if ( !isset( $params['thumbName'] ) ) { @@ -495,8 +495,8 @@ function wfExtractThumbParams( $file, $params ) { /** * Output a thumbnail generation error message * - * @param $status integer - * @param $msg string + * @param int $status + * @param string $msg * @return void */ function wfThumbError( $status, $msg ) { -- 2.20.1