From a9007e8baf802f0f57d095e3bb4ad201c98c0cb3 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 11 Aug 2017 02:23:16 +0200 Subject: [PATCH] Add missing & to @param documentation to match functon call Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9 --- includes/AuthPlugin.php | 10 +++---- includes/EditPage.php | 16 +++++------ includes/FileDeleteForm.php | 10 +++---- includes/GlobalFunctions.php | 8 +++--- includes/Licenses.php | 2 +- includes/Linker.php | 2 +- includes/MagicWord.php | 8 +++--- includes/MagicWordArray.php | 4 +-- includes/OutputPage.php | 6 ++-- includes/Preferences.php | 20 ++++++------- includes/ProtectionForm.php | 2 +- includes/Revision.php | 2 +- includes/SiteConfiguration.php | 2 +- includes/StubObject.php | 2 +- includes/Title.php | 4 +-- includes/api/ApiBase.php | 4 +-- includes/api/ApiDelete.php | 4 +-- includes/api/ApiParamInfo.php | 2 +- includes/api/ApiQueryBase.php | 2 +- includes/api/ApiQueryLogEvents.php | 2 +- includes/cache/LinkBatch.php | 2 +- includes/cache/MessageCache.php | 2 +- .../cache/localisation/LocalisationCache.php | 8 +++--- includes/changes/ChangesFeed.php | 2 +- includes/changes/ChangesList.php | 28 +++++++++---------- includes/changes/EnhancedChangesList.php | 2 +- includes/changes/OldChangesList.php | 2 +- includes/changes/RecentChange.php | 16 +++++------ includes/changetags/ChangeTags.php | 10 +++---- includes/compat/normal/UtfNormal.php | 2 +- includes/content/ContentHandler.php | 2 +- includes/content/JsonContent.php | 2 +- includes/content/TextContent.php | 2 +- includes/db/ORAResult.php | 2 +- includes/deferred/SiteStatsUpdate.php | 2 +- includes/diff/DiffFormatter.php | 2 +- includes/export/DumpFilter.php | 2 +- includes/export/DumpNamespaceFilter.php | 2 +- includes/export/WikiExporter.php | 2 +- includes/gallery/TraditionalImageGallery.php | 2 +- includes/htmlform/HTMLForm.php | 2 +- includes/import/UploadSourceAdapter.php | 2 +- includes/import/WikiImporter.php | 2 +- includes/installer/DatabaseUpdater.php | 2 +- includes/installer/SqliteInstaller.php | 2 +- includes/jobqueue/JobQueueFederated.php | 2 +- includes/libs/ArrayUtils.php | 2 +- includes/libs/MultiHttpClient.php | 2 +- .../libs/filebackend/SwiftFileBackend.php | 6 ++-- includes/libs/filebackend/fileop/FileOp.php | 4 +-- includes/libs/lockmanager/ScopedLock.php | 2 +- includes/libs/objectcache/BagOStuff.php | 2 +- includes/libs/objectcache/WANObjectCache.php | 4 +-- .../libs/rdbms/database/DatabaseMysqlBase.php | 4 +-- includes/logging/LogEventsList.php | 2 +- includes/logging/LogPage.php | 2 +- includes/media/Bitmap.php | 2 +- includes/media/Bitmap_ClientOnly.php | 2 +- includes/media/FormatMetadata.php | 8 +++--- includes/media/ImageHandler.php | 6 ++-- includes/media/MediaHandler.php | 4 +-- includes/media/SVG.php | 2 +- .../media/TransformationalImageHandler.php | 4 +-- includes/objectcache/SqlBagOStuff.php | 2 +- includes/page/Article.php | 12 ++++---- includes/page/WikiPage.php | 4 +-- includes/parser/LinkHolderArray.php | 8 +++--- includes/parser/Parser.php | 10 +++---- includes/profiler/Profiler.php | 2 +- includes/profiler/SectionProfiler.php | 2 +- includes/revisiondelete/RevisionDeleter.php | 2 +- includes/search/SearchHighlighter.php | 16 +++++------ includes/search/SearchMySQL.php | 6 ++-- includes/skins/QuickTemplate.php | 4 +-- includes/skins/Skin.php | 8 +++--- .../specialpage/AuthManagerSpecialPage.php | 4 +-- .../specialpage/LoginSignupSpecialPage.php | 2 +- includes/specialpage/SpecialPageFactory.php | 4 +-- includes/specials/SpecialBlock.php | 2 +- includes/specials/SpecialRecentchanges.php | 2 +- includes/specials/SpecialSearch.php | 2 +- includes/upload/UploadBase.php | 4 +-- includes/upload/UploadFromFile.php | 2 +- includes/upload/UploadFromStash.php | 2 +- includes/upload/UploadFromUrl.php | 2 +- includes/user/User.php | 2 +- 86 files changed, 190 insertions(+), 190 deletions(-) diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index b85e1d6fc1..24ae8561cc 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -73,8 +73,8 @@ class AuthPlugin { /** * Modify options in the login template. * - * @param BaseTemplate $template - * @param string $type 'signup' or 'login'. Added in 1.16. + * @param BaseTemplate &$template + * @param string &$type 'signup' or 'login'. Added in 1.16. */ public function modifyUITemplate( &$template, &$type ) { # Override this! @@ -124,7 +124,7 @@ class AuthPlugin { * * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning * a different User object to $user is no longer supported. - * @param User $user + * @param User &$user * @return bool */ public function updateUser( &$user ) { @@ -286,7 +286,7 @@ class AuthPlugin { * * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning * a different User object to $user is no longer supported. - * @param User $user + * @param User &$user * @param bool $autocreate True if user is being autocreated on login */ public function initUser( &$user, $autocreate = false ) { @@ -306,7 +306,7 @@ class AuthPlugin { /** * Get an instance of a User object * - * @param User $user + * @param User &$user * * @return AuthPluginUser */ diff --git a/includes/EditPage.php b/includes/EditPage.php index cfb78cd78d..cc27e88a56 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -852,7 +852,7 @@ class EditPage { /** * This function collects the form data and uses it to populate various member variables. - * @param WebRequest $request + * @param WebRequest &$request * @throws ErrorPageError */ public function importFormData( &$request ) { @@ -1080,7 +1080,7 @@ class EditPage { * this method should be overridden and return the page text that will be used * for saving, preview parsing and so on... * - * @param WebRequest $request + * @param WebRequest &$request * @return string|null */ protected function importContentFormData( &$request ) { @@ -1432,7 +1432,7 @@ class EditPage { /** * Make sure the form isn't faking a user's credentials. * - * @param WebRequest $request + * @param WebRequest &$request * @return bool * @private */ @@ -1475,7 +1475,7 @@ class EditPage { /** * Attempt submission - * @param array|bool $resultDetails See docs for $result in internalAttemptSave + * @param array|bool &$resultDetails See docs for $result in internalAttemptSave * @throws UserBlockedError|ReadOnlyError|ThrottledError|PermissionsError * @return Status The resulting status object. */ @@ -1721,7 +1721,7 @@ class EditPage { /** * Attempt submission (no UI) * - * @param array $result Array to add statuses to, currently with the + * @param array &$result Array to add statuses to, currently with the * possible keys: * - spam (string): Spam string from content if any spam is detected by * matchSpamRegex. @@ -4202,7 +4202,7 @@ class EditPage { * Returns an array of html code of the following checkboxes old style: * minor and watch * - * @param int $tabindex Current tabindex + * @param int &$tabindex Current tabindex * @param array $checked See getCheckboxesDefinition() * @return array */ @@ -4260,7 +4260,7 @@ class EditPage { * Returns an array of html code of the following checkboxes: * minor and watch * - * @param int $tabindex Current tabindex + * @param int &$tabindex Current tabindex * @param array $checked Array of checkbox => bool, where bool indicates the checked * status of the checkbox * @@ -4345,7 +4345,7 @@ class EditPage { * Returns an array of html code of the following buttons: * save, diff and preview * - * @param int $tabindex Current tabindex + * @param int &$tabindex Current tabindex * * @return array */ diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 8a1cd35297..8c843c4438 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -143,9 +143,9 @@ class FileDeleteForm { /** * Really delete the file * - * @param Title $title - * @param File $file - * @param string $oldimage Archive name + * @param Title &$title + * @param File &$file + * @param string &$oldimage Archive name * @param string $reason Reason of the deletion * @param bool $suppress Whether to mark all deleted versions as restricted * @param User $user User object performing the request @@ -398,8 +398,8 @@ class FileDeleteForm { * value was provided, does it correspond to an * existing, local, old version of this file? * - * @param File $file - * @param File $oldfile + * @param File &$file + * @param File &$oldfile * @param File $oldimage * @return bool */ diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 70784ba5a7..b35a1f05c9 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -241,7 +241,7 @@ function wfArrayFilterByKey( array $arr, callable $callback ) { * @param string|int $key * @param mixed $value * @param mixed $default - * @param array $changed Array to alter + * @param array &$changed Array to alter * @throws MWException */ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) { @@ -1750,7 +1750,7 @@ function wfEscapeWikiText( $text ) { * If source is NULL, it just returns the value, it doesn't set the variable * If force is true, it will set the value even if source is NULL * - * @param mixed $dest + * @param mixed &$dest * @param mixed $source * @param bool $force * @return mixed @@ -1766,7 +1766,7 @@ function wfSetVar( &$dest, $source, $force = false ) { /** * As for wfSetVar except setting a bit * - * @param int $dest + * @param int &$dest * @param int $bit * @param bool $state * @@ -2618,7 +2618,7 @@ function wfShellWikiCmd( $script, array $parameters = [], array $options = [] ) * @param string $old * @param string $mine * @param string $yours - * @param string $result + * @param string &$result * @return bool */ function wfMerge( $old, $mine, $yours, &$result ) { diff --git a/includes/Licenses.php b/includes/Licenses.php index da1a8da6b0..6467777bff 100644 --- a/includes/Licenses.php +++ b/includes/Licenses.php @@ -92,7 +92,7 @@ class Licenses extends HTMLFormField { } /** - * @param array $list + * @param array &$list * @param array $path * @param mixed $item */ diff --git a/includes/Linker.php b/includes/Linker.php index 2ca851c13f..34cc49aaf9 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1350,7 +1350,7 @@ class Linker { /** * @param Title $contextTitle * @param string $target - * @param string $text + * @param string &$text * @return string */ public static function normalizeSubpageLink( $contextTitle, $target, &$text ) { diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 1703179c9e..e70b8cec5c 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -518,7 +518,7 @@ class MagicWord { * Returns true if the text matches the word, and alters the * input string, removing all instances of the word * - * @param string $text + * @param string &$text * * @return bool */ @@ -534,7 +534,7 @@ class MagicWord { } /** - * @param string $text + * @param string &$text * @return bool */ public function matchStartAndRemove( &$text ) { @@ -655,7 +655,7 @@ class MagicWord { * * @param array $magicarr * @param string $subject - * @param string $result + * @param string &$result * * @return bool */ @@ -677,7 +677,7 @@ class MagicWord { * Adds all the synonyms of this MagicWord to an array, to allow quick * lookup in a list of magic words * - * @param array $array + * @param array &$array * @param string $value */ public function addToArray( &$array, $value ) { diff --git a/includes/MagicWordArray.php b/includes/MagicWordArray.php index 6a9ead5f1e..7461191fca 100644 --- a/includes/MagicWordArray.php +++ b/includes/MagicWordArray.php @@ -260,7 +260,7 @@ class MagicWordArray { * Returns an associative array, ID => param value, for all items that match * Removes the matched items from the input string (passed by reference) * - * @param string $text + * @param string &$text * * @return array */ @@ -304,7 +304,7 @@ class MagicWordArray { * Return false if no match found and $text is not modified. * Does not match parameters. * - * @param string $text + * @param string &$text * * @return int|bool False on failure */ diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6aa11f6f84..57cb194af1 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1715,7 +1715,7 @@ class OutputPage extends ContextSource { * Add wikitext with a custom Title object * * @param string $text Wikitext - * @param Title $title + * @param Title &$title * @param bool $linestart Is this the start of a line? */ public function addWikiTextWithTitle( $text, &$title, $linestart = true ) { @@ -1726,7 +1726,7 @@ class OutputPage extends ContextSource { * Add wikitext with a custom Title object and tidy enabled. * * @param string $text Wikitext - * @param Title $title + * @param Title &$title * @param bool $linestart Is this the start of a line? */ function addWikiTextTitleTidy( $text, &$title, $linestart = true ) { @@ -1899,7 +1899,7 @@ class OutputPage extends ContextSource { /** * Add the output of a QuickTemplate to the output buffer * - * @param QuickTemplate $template + * @param QuickTemplate &$template */ public function addTemplate( &$template ) { $this->addHTML( $template->getHTML() ); diff --git a/includes/Preferences.php b/includes/Preferences.php index 15ed2d4424..48eaaf2f0b 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -109,7 +109,7 @@ class Preferences { * @throws MWException * @param User $user * @param IContextSource $context - * @param array $defaultPreferences Array to load values for + * @param array &$defaultPreferences Array to load values for * @return array|null */ static function loadPreferenceValues( $user, $context, &$defaultPreferences ) { @@ -202,7 +202,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences * @return void */ static function profilePreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -599,7 +599,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences * @return void */ static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -650,7 +650,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function filesPreferences( $user, IContextSource $context, &$defaultPreferences ) { # # Files ##################################### @@ -671,7 +671,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences * @return void */ static function datetimePreferences( $user, IContextSource $context, &$defaultPreferences ) { @@ -749,7 +749,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function renderingPreferences( $user, IContextSource $context, &$defaultPreferences ) { # # Diffs #################################### @@ -811,7 +811,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) { # # Editing ##################################### @@ -884,7 +884,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function rcPreferences( $user, IContextSource $context, &$defaultPreferences ) { $config = $context->getConfig(); @@ -960,7 +960,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function watchlistPreferences( $user, IContextSource $context, &$defaultPreferences ) { $config = $context->getConfig(); @@ -1110,7 +1110,7 @@ class Preferences { /** * @param User $user * @param IContextSource $context - * @param array $defaultPreferences + * @param array &$defaultPreferences */ static function searchPreferences( $user, IContextSource $context, &$defaultPreferences ) { foreach ( MWNamespace::getValidNamespaces() as $n ) { diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index a68c36fb6b..53608e849a 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -616,7 +616,7 @@ class ProtectionForm { /** * Show protection long extracts for this page * - * @param OutputPage $out + * @param OutputPage &$out * @access private */ function showLogExtract( &$out ) { diff --git a/includes/Revision.php b/includes/Revision.php index 88b138ddf0..3d4d161547 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -1307,7 +1307,7 @@ class Revision implements IDBAccessObject { * data is compressed, and 'utf-8' if we're saving in UTF-8 * mode. * - * @param mixed $text Reference to a text + * @param mixed &$text Reference to a text * @return string */ public static function compressRevisionText( &$text ) { diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index 8d9256b811..7a01a6575b 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -345,7 +345,7 @@ class SiteConfiguration { * @param string $setting ID of the setting name to retrieve * @param string $wiki Wiki ID of the wiki in question. * @param string $suffix The suffix of the wiki in question. - * @param array $var Reference The variable to insert the value into. + * @param array &$var Reference The variable to insert the value into. * @param array $params List of parameters. $.'key' is replaced by $value in all returned data. * @param array $wikiTags The tags assigned to the wiki. */ diff --git a/includes/StubObject.php b/includes/StubObject.php index 5208b8f1fa..baf5109952 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -86,7 +86,7 @@ class StubObject { * infinite loop when unstubbing an object or to avoid reference parameter * breakage. * - * @param object $obj Object to check. + * @param object &$obj Object to check. * @return void */ public static function unstub( &$obj ) { diff --git a/includes/Title.php b/includes/Title.php index 5dececee8e..1fd1073531 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3693,7 +3693,7 @@ class Title implements LinkTarget { * Returns true if ok, or a getUserPermissionsErrors()-like array otherwise * * @deprecated since 1.25, use MovePage's methods instead - * @param Title $nt The new title + * @param Title &$nt The new title * @param bool $auth Whether to check user permissions (uses $wgUser) * @param string $reason Is the log summary of the move, used for spam checking * @return array|bool True on success, getUserPermissionsErrors()-like array on failure @@ -3745,7 +3745,7 @@ class Title implements LinkTarget { * Move a title to a new location * * @deprecated since 1.25, use the MovePage class instead - * @param Title $nt The new title + * @param Title &$nt The new title * @param bool $auth Indicates whether $wgUser's permissions * should be checked * @param string $reason The reason for the move diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 500f4324df..81696e0348 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1432,7 +1432,7 @@ abstract class ApiBase extends ContextSource { * Validate the value against the minimum and user/bot maximum limits. * Prints usage info on failure. * @param string $paramName Parameter name - * @param int $value Parameter value + * @param int &$value Parameter value * @param int|null $min Minimum value * @param int|null $max Maximum value for users * @param int $botMax Maximum value for sysops/bots @@ -1599,7 +1599,7 @@ abstract class ApiBase extends ContextSource { /** * Truncate an array to a certain length. - * @param array $arr Array to truncate + * @param array &$arr Array to truncate * @param int $limit Maximum length * @return bool True if the array was truncated, false otherwise */ diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 72bbe00482..7766acd363 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -106,7 +106,7 @@ class ApiDelete extends ApiBase { * * @param Page|WikiPage $page Page or WikiPage object to work on * @param User $user User doing the action - * @param string|null $reason Reason for the deletion. Autogenerated if null + * @param string|null &$reason Reason for the deletion. Autogenerated if null * @param array $tags Tags to tag the deletion with * @return Status */ @@ -142,7 +142,7 @@ class ApiDelete extends ApiBase { * @param Page $page Object to work on * @param User $user User doing the action * @param string $oldimage Archive name - * @param string $reason Reason for the deletion. Autogenerated if null. + * @param string &$reason Reason for the deletion. Autogenerated if null. * @param bool $suppress Whether to mark all deleted versions as restricted * @param array $tags Tags to tag the deletion with * @return Status diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 4ce0e9f108..17b00933a1 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -184,7 +184,7 @@ class ApiParamInfo extends ApiBase { } /** - * @param array $res Result array + * @param array &$res Result array * @param string $key Result key * @param Message[] $msgs * @param bool $joinLists diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index f8eaa84074..44526e88b1 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -478,7 +478,7 @@ abstract class ApiQueryBase extends ApiBase { /** * Add information (title and namespace) about a Title object to a * result array - * @param array $arr Result array à la ApiResult + * @param array &$arr Result array à la ApiResult * @param Title $title * @param string $prefix Module prefix */ diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index df8a11ee8b..3e8bccc74d 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -242,7 +242,7 @@ class ApiQueryLogEvents extends ApiQueryBase { /** * @deprecated since 1.25 Use LogFormatter::formatParametersForApi instead * @param ApiResult $result - * @param array $vals + * @param array &$vals * @param string $params * @param string $type * @param string $action diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index d8e3c38176..38cb6be566 100644 --- a/includes/cache/LinkBatch.php +++ b/includes/cache/LinkBatch.php @@ -131,7 +131,7 @@ class LinkBatch { * Do the query and add the results to a given LinkCache object * Return an array mapping PDBK to ID * - * @param LinkCache $cache + * @param LinkCache &$cache * @return array Remaining IDs */ protected function executeInto( &$cache ) { diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index f9f9a08a33..16c1ac55fc 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -395,7 +395,7 @@ class MessageCache { /** * @param string $code - * @param array $where List of wfDebug() comments + * @param array &$where List of wfDebug() comments * @param integer $mode Use MessageCache::FOR_UPDATE to use DB_MASTER * @return bool|string True on success or one of ("cantacquire", "disabled") */ diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 58a67adb8e..e0da22eaaa 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -687,7 +687,7 @@ class LocalisationCache { * exists, the data array is returned, otherwise false is returned. * * @param string $code - * @param array $deps + * @param array &$deps * @return array */ protected function readSourceFilesAndRegisterDeps( $code, &$deps ) { @@ -719,7 +719,7 @@ class LocalisationCache { * Merge two localisation values, a primary and a fallback, overwriting the * primary value in place. * @param string $key - * @param mixed $value + * @param mixed &$value * @param mixed $fallbackValue */ protected function mergeItem( $key, &$value, $fallbackValue ) { @@ -749,7 +749,7 @@ class LocalisationCache { } /** - * @param mixed $value + * @param mixed &$value * @param mixed $fallbackValue */ protected function mergeMagicWords( &$value, $fallbackValue ) { @@ -775,7 +775,7 @@ class LocalisationCache { * otherwise. * @param array $codeSequence * @param string $key - * @param mixed $value + * @param mixed &$value * @param mixed $fallbackValue * @return bool */ diff --git a/includes/changes/ChangesFeed.php b/includes/changes/ChangesFeed.php index 99dc8991f2..df964e0a2b 100644 --- a/includes/changes/ChangesFeed.php +++ b/includes/changes/ChangesFeed.php @@ -165,7 +165,7 @@ class ChangesFeed { /** * Generate the feed items given a row from the database, printing the feed. * @param object $rows IDatabase resource with recentchanges rows - * @param ChannelFeed $feed + * @param ChannelFeed &$feed */ public static function generateFeed( $rows, &$feed ) { $items = self::buildItems( $rows ); diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 04f815a9fd..65eb3205c5 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -102,7 +102,7 @@ class ChangesList extends ContextSource { * * @since 1.27 * - * @param RecentChange $rc Passed by reference + * @param RecentChange &$rc Passed by reference * @param bool $watched (default false) * @param int $linenumber (default null) * @@ -362,7 +362,7 @@ class ChangesList extends ContextSource { } /** - * @param string $s HTML to update + * @param string &$s HTML to update * @param mixed $rc_timestamp */ public function insertDateHeader( &$s, $rc_timestamp ) { @@ -379,7 +379,7 @@ class ChangesList extends ContextSource { } /** - * @param string $s HTML to update + * @param string &$s HTML to update * @param Title $title * @param string $logtype */ @@ -392,8 +392,8 @@ class ChangesList extends ContextSource { } /** - * @param string $s HTML to update - * @param RecentChange $rc + * @param string &$s HTML to update + * @param RecentChange &$rc * @param bool|null $unpatrolled Unused variable, since 1.27. */ public function insertDiffHist( &$s, &$rc, $unpatrolled = null ) { @@ -442,7 +442,7 @@ class ChangesList extends ContextSource { } /** - * @param string $s Article link will be appended to this string, in place. + * @param string &$s Article link will be appended to this string, in place. * @param RecentChange $rc * @param bool $unpatrolled * @param bool $watched @@ -453,7 +453,7 @@ class ChangesList extends ContextSource { } /** - * @param RecentChange $rc + * @param RecentChange &$rc * @param bool $unpatrolled * @param bool $watched * @return string HTML @@ -508,7 +508,7 @@ class ChangesList extends ContextSource { /** * Insert time timestamp string from $rc into $s * - * @param string $s HTML to update + * @param string &$s HTML to update * @param RecentChange $rc */ public function insertTimestamp( &$s, $rc ) { @@ -620,8 +620,8 @@ class ChangesList extends ContextSource { /** Inserts a rollback link * - * @param string $s - * @param RecentChange $rc + * @param string &$s + * @param RecentChange &$rc */ public function insertRollback( &$s, &$rc ) { if ( $rc->mAttribs['rc_type'] == RC_EDIT @@ -658,9 +658,9 @@ class ChangesList extends ContextSource { } /** - * @param string $s - * @param RecentChange $rc - * @param array $classes + * @param string &$s + * @param RecentChange &$rc + * @param array &$classes */ public function insertTags( &$s, &$rc, &$classes ) { if ( empty( $rc->mAttribs['ts_tags'] ) ) { @@ -678,7 +678,7 @@ class ChangesList extends ContextSource { /** * @param RecentChange $rc - * @param array $classes + * @param array &$classes * @return string * @since 1.26 */ diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index 55cb9edd08..ffe668c60d 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -91,7 +91,7 @@ class EnhancedChangesList extends ChangesList { /** * Format a line for enhanced recentchange (aka with javascript and block of lines). * - * @param RecentChange $rc + * @param RecentChange &$rc * @param bool $watched * @param int $linenumber (default null) * diff --git a/includes/changes/OldChangesList.php b/includes/changes/OldChangesList.php index 09205bd318..4c4fb7e963 100644 --- a/includes/changes/OldChangesList.php +++ b/includes/changes/OldChangesList.php @@ -25,7 +25,7 @@ class OldChangesList extends ChangesList { /** * Format a line using the old system (aka without any javascript). * - * @param RecentChange $rc Passed by reference + * @param RecentChange &$rc Passed by reference * @param bool $watched (default false) * @param int $linenumber (default null) * diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 5fad8fd9ea..64c5555890 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -552,9 +552,9 @@ class RecentChange { * Makes an entry in the database corresponding to an edit * * @param string $timestamp - * @param Title $title + * @param Title &$title * @param bool $minor - * @param User $user + * @param User &$user * @param string $comment * @param int $oldId * @param string $lastTimestamp @@ -629,9 +629,9 @@ class RecentChange { * Note: the title object must be loaded with the new id using resetArticleID() * * @param string $timestamp - * @param Title $title + * @param Title &$title * @param bool $minor - * @param User $user + * @param User &$user * @param string $comment * @param bool $bot * @param string $ip @@ -699,8 +699,8 @@ class RecentChange { /** * @param string $timestamp - * @param Title $title - * @param User $user + * @param Title &$title + * @param User &$user * @param string $actionComment * @param string $ip * @param string $type @@ -730,8 +730,8 @@ class RecentChange { /** * @param string $timestamp - * @param Title $title - * @param User $user + * @param Title &$title + * @param User &$user * @param string $actionComment * @param string $ip * @param string $type diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 2eb9b225d5..608e7bb224 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -649,11 +649,11 @@ class ChangeTags { * if you had ORDER BY foo_timestamp DESC, you will now need GROUP BY foo_timestamp, foo_id * ORDER BY foo_timestamp DESC, foo_id DESC. * - * @param string|array $tables Table names, see Database::select - * @param string|array $fields Fields used in query, see Database::select - * @param string|array $conds Conditions used in query, see Database::select - * @param array $join_conds Join conditions, see Database::select - * @param string|array $options Options, see Database::select + * @param string|array &$tables Table names, see Database::select + * @param string|array &$fields Fields used in query, see Database::select + * @param string|array &$conds Conditions used in query, see Database::select + * @param array &$join_conds Join conditions, see Database::select + * @param string|array &$options Options, see Database::select * @param string|array $filter_tag Tag(s) to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging diff --git a/includes/compat/normal/UtfNormal.php b/includes/compat/normal/UtfNormal.php index c9c05a0759..9b35cad485 100644 --- a/includes/compat/normal/UtfNormal.php +++ b/includes/compat/normal/UtfNormal.php @@ -120,7 +120,7 @@ class UtfNormal { /** * Returns true if the string is _definitely_ in NFC. * Returns false if not or uncertain. - * @param string $string a UTF-8 string, altered on output to be valid UTF-8 safe for XML. + * @param string &$string a UTF-8 string, altered on output to be valid UTF-8 safe for XML. * @return bool */ static function quickIsNFCVerify( &$string ) { diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 8603360ee0..90364f397f 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -1134,7 +1134,7 @@ abstract class ContentHandler { /** * Add new field definition to array. - * @param SearchIndexField[] $fields + * @param SearchIndexField[] &$fields * @param SearchEngine $engine * @param string $name * @param int $type diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php index 14c81823cf..2f4554731e 100644 --- a/includes/content/JsonContent.php +++ b/includes/content/JsonContent.php @@ -96,7 +96,7 @@ class JsonContent extends TextContent { * @param int $revId * @param ParserOptions $options * @param bool $generateHtml - * @param ParserOutput $output + * @param ParserOutput &$output */ protected function fillParserOutput( Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index 7bb4def2a6..45d00c5e42 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -233,7 +233,7 @@ class TextContent extends AbstractContent { * @param int $revId Revision ID (for {{REVISIONID}}) * @param ParserOptions $options Parser options * @param bool $generateHtml Whether or not to generate HTML - * @param ParserOutput $output The output object to fill (reference). + * @param ParserOutput &$output The output object to fill (reference). */ protected function fillParserOutput( Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output diff --git a/includes/db/ORAResult.php b/includes/db/ORAResult.php index fbbc962e01..aafd386138 100644 --- a/includes/db/ORAResult.php +++ b/includes/db/ORAResult.php @@ -31,7 +31,7 @@ class ORAResult { } /** - * @param IDatabase $db + * @param IDatabase &$db * @param resource $stmt A valid OCI statement identifier * @param bool $unique */ diff --git a/includes/deferred/SiteStatsUpdate.php b/includes/deferred/SiteStatsUpdate.php index 8c38d8b0ca..2f074ba2d3 100644 --- a/includes/deferred/SiteStatsUpdate.php +++ b/includes/deferred/SiteStatsUpdate.php @@ -189,7 +189,7 @@ class SiteStatsUpdate implements DeferrableUpdate, MergeableUpdate { } /** - * @param string $sql + * @param string &$sql * @param string $field * @param int $delta */ diff --git a/includes/diff/DiffFormatter.php b/includes/diff/DiffFormatter.php index 6231c78ea7..07124c02ce 100644 --- a/includes/diff/DiffFormatter.php +++ b/includes/diff/DiffFormatter.php @@ -125,7 +125,7 @@ abstract class DiffFormatter { * @param int $xlen * @param int $ybeg * @param int $ylen - * @param array $edits + * @param array &$edits * * @throws MWException If the edit type is not known. */ diff --git a/includes/export/DumpFilter.php b/includes/export/DumpFilter.php index 5c27658af5..1349c54b95 100644 --- a/includes/export/DumpFilter.php +++ b/includes/export/DumpFilter.php @@ -42,7 +42,7 @@ class DumpFilter { protected $sendingThisPage; /** - * @param DumpOutput $sink + * @param DumpOutput &$sink */ function __construct( &$sink ) { $this->sink =& $sink; diff --git a/includes/export/DumpNamespaceFilter.php b/includes/export/DumpNamespaceFilter.php index c20e299ef7..2b71db00f2 100644 --- a/includes/export/DumpNamespaceFilter.php +++ b/includes/export/DumpNamespaceFilter.php @@ -34,7 +34,7 @@ class DumpNamespaceFilter extends DumpFilter { public $namespaces = []; /** - * @param DumpOutput $sink + * @param DumpOutput &$sink * @param array $param * @throws MWException */ diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index 943aa045f9..d512654168 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -106,7 +106,7 @@ class WikiExporter { * various row objects and XML output for filtering. Filters * can be chained or used as callbacks. * - * @param DumpOutput $sink + * @param DumpOutput &$sink */ public function setOutputSink( &$sink ) { $this->sink =& $sink; diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php index a0059cea1f..7a520bcbd1 100644 --- a/includes/gallery/TraditionalImageGallery.php +++ b/includes/gallery/TraditionalImageGallery.php @@ -348,7 +348,7 @@ class TraditionalImageGallery extends ImageGalleryBase { * * Used by a subclass to insert extra high resolution images. * @param MediaTransformOutput $thumb The thumbnail - * @param array $imageParameters Array of options + * @param array &$imageParameters Array of options */ protected function adjustImageParameters( $thumb, &$imageParameters ) { } diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 702c2ebc7a..dda9e88012 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -450,7 +450,7 @@ class HTMLForm extends ContextSource { * @since 1.23 * * @param string $fieldname Name of the field - * @param array $descriptor Input Descriptor, as described above + * @param array &$descriptor Input Descriptor, as described above * * @throws MWException * @return string Name of a HTMLFormField subclass diff --git a/includes/import/UploadSourceAdapter.php b/includes/import/UploadSourceAdapter.php index 1f49c8aaf5..ccacbe4a7c 100644 --- a/includes/import/UploadSourceAdapter.php +++ b/includes/import/UploadSourceAdapter.php @@ -57,7 +57,7 @@ class UploadSourceAdapter { * @param string $path * @param string $mode * @param array $options - * @param string $opened_path + * @param string &$opened_path * @return bool */ function stream_open( $path, $mode, $options, &$opened_path ) { diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php index 63258cbcba..7c89b23a20 100644 --- a/includes/import/WikiImporter.php +++ b/includes/import/WikiImporter.php @@ -428,7 +428,7 @@ class WikiImporter { /** * Alternate per-revision callback, for debugging. - * @param WikiRevision $revision + * @param WikiRevision &$revision */ public function debugRevisionHandler( &$revision ) { $this->debug( "Got revision:" ); diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 8f5858bb1e..b832d450ee 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -106,7 +106,7 @@ abstract class DatabaseUpdater { protected $holdContentHandlerUseDB = true; /** - * @param Database $db To perform updates on + * @param Database &$db To perform updates on * @param bool $shared Whether to perform updates on shared tables * @param Maintenance $maintenance Maintenance object which created us */ diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index 0f639badd8..cc8159c5b7 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -296,7 +296,7 @@ EOT; } /** - * @param Status $status + * @param Status &$status * @return Status */ public function setupSearchIndex( &$status ) { diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php index 44721d9e8f..e74331113d 100644 --- a/includes/jobqueue/JobQueueFederated.php +++ b/includes/jobqueue/JobQueueFederated.php @@ -202,7 +202,7 @@ class JobQueueFederated extends JobQueue { /** * @param array $jobs - * @param HashRing $partitionRing + * @param HashRing &$partitionRing * @param int $flags * @throws JobQueueError * @return array List of Job object that could not be inserted diff --git a/includes/libs/ArrayUtils.php b/includes/libs/ArrayUtils.php index 2156bd7f1d..0413ea0d5a 100644 --- a/includes/libs/ArrayUtils.php +++ b/includes/libs/ArrayUtils.php @@ -39,7 +39,7 @@ class ArrayUtils { * justification for breaking compatibility with installations * compiled with ./configure --disable-hash. * - * @param array $array Array to sort + * @param array &$array Array to sort * @param string $key * @param string $separator A separator used to delimit the array elements and the * key. This can be chosen to provide backwards compatibility with diff --git a/includes/libs/MultiHttpClient.php b/includes/libs/MultiHttpClient.php index 9d6b734c0e..4f6195cc6d 100644 --- a/includes/libs/MultiHttpClient.php +++ b/includes/libs/MultiHttpClient.php @@ -275,7 +275,7 @@ class MultiHttpClient implements LoggerAwareInterface { } /** - * @param array $req HTTP request map + * @param array &$req HTTP request map * @param array $opts * - connTimeout : default connection timeout * - reqTimeout : default request timeout diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index 044e976bb0..5d7795dcb3 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -828,7 +828,7 @@ class SwiftFileBackend extends FileBackendStore { * * @param string $fullCont Resolved container name * @param string $dir Resolved storage directory with no trailing slash - * @param string|null $after Resolved container relative path to list items after + * @param string|null &$after Resolved container relative path to list items after * @param int $limit Max number of items to list * @param array $params Parameters for getDirectoryList() * @return array List of container relative resolved paths of directories directly under $dir @@ -908,7 +908,7 @@ class SwiftFileBackend extends FileBackendStore { * * @param string $fullCont Resolved container name * @param string $dir Resolved storage directory with no trailing slash - * @param string|null $after Resolved container relative path of file to list items after + * @param string|null &$after Resolved container relative path of file to list items after * @param int $limit Max number of items to list * @param array $params Parameters for getDirectoryList() * @return array List of resolved container relative paths of files under $dir @@ -1888,7 +1888,7 @@ abstract class SwiftFileBackendList implements Iterator { * * @param string $container Resolved container name * @param string $dir Resolved path relative to container - * @param string $after + * @param string &$after * @param int $limit * @param array $params * @return Traversable|array diff --git a/includes/libs/filebackend/fileop/FileOp.php b/includes/libs/filebackend/fileop/FileOp.php index 30578fa5da..40af7aca78 100644 --- a/includes/libs/filebackend/fileop/FileOp.php +++ b/includes/libs/filebackend/fileop/FileOp.php @@ -247,7 +247,7 @@ abstract class FileOp { * This must update $predicates for each path that the op can change * except when a failing StatusValue object is returned. * - * @param array $predicates + * @param array &$predicates * @return StatusValue */ final public function precheck( array &$predicates ) { @@ -264,7 +264,7 @@ abstract class FileOp { } /** - * @param array $predicates + * @param array &$predicates * @return StatusValue */ protected function doPrecheck( array &$predicates ) { diff --git a/includes/libs/lockmanager/ScopedLock.php b/includes/libs/lockmanager/ScopedLock.php index e10606a8ce..2ad8ac87b5 100644 --- a/includes/libs/lockmanager/ScopedLock.php +++ b/includes/libs/lockmanager/ScopedLock.php @@ -85,7 +85,7 @@ class ScopedLock { * This is useful for early release of locks before function scope is destroyed. * This is the same as setting the lock object to null. * - * @param ScopedLock $lock + * @param ScopedLock &$lock * @since 1.21 */ public static function release( ScopedLock &$lock = null ) { diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 7cd678b035..e0f27504cc 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -229,7 +229,7 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { * @note: This method is only needed if merge() uses mergeViaCas() * * @param string $key - * @param mixed $casToken + * @param mixed &$casToken * @param integer $flags Bitfield of BagOStuff::READ_* constants [optional] * @return mixed Returns false on failure and if the item does not exist * @throws Exception diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index ff7e91ac3e..4f90c7d77d 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -240,7 +240,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * That method has cache slam avoiding features for hot/expensive keys. * * @param string $key Cache key - * @param mixed $curTTL Approximate TTL left on the key if present/tombstoned [returned] + * @param mixed &$curTTL Approximate TTL left on the key if present/tombstoned [returned] * @param array $checkKeys List of "check" keys * @param float &$asOf UNIX timestamp of cached value; null on failure [returned] * @return mixed Value of cache key or false on failure @@ -261,7 +261,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @see WANObjectCache::get() * * @param array $keys List of cache keys - * @param array $curTTLs Map of (key => approximate TTL left) for existing keys [returned] + * @param array &$curTTLs Map of (key => approximate TTL left) for existing keys [returned] * @param array $checkKeys List of check keys to apply to all $keys. May also apply "check" * keys to specific cache keys only by using cache keys as keys in the $checkKeys array. * @param float[] &$asOfs Map of (key => UNIX timestamp of cached value; null on failure) diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 8d19bc1b34..991e0c6660 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -989,8 +989,8 @@ abstract class DatabaseMysqlBase extends Database { } /** - * @param string $sql - * @param string $newLine + * @param string &$sql + * @param string &$newLine * @return bool */ public function streamStatementEnd( &$sql, &$newLine ) { diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index 22e5b45cf1..2b09cca051 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -569,7 +569,7 @@ class LogEventsList extends ContextSource { /** * Show log extract. Either with text and a box (set $msgKey) or without (don't set $msgKey) * - * @param OutputPage|string $out By-reference + * @param OutputPage|string &$out * @param string|array $types Log types to show * @param string|Title $page The page title to show log entries for * @param string $user The user who made the log entries diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index ec97b50c24..a085e3e114 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -287,7 +287,7 @@ class LogPage { * @param string $type * @param Language|null $lang * @param Title $title - * @param array $params + * @param array &$params * @return string */ protected static function getTitleLink( $type, $lang, $title, &$params ) { diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 1aeead5df8..ac39e6f3d4 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -88,7 +88,7 @@ class BitmapHandler extends TransformationalImageHandler { /** * @param File $image - * @param array $params + * @param array &$params * @return bool */ function normaliseParams( $image, &$params ) { diff --git a/includes/media/Bitmap_ClientOnly.php b/includes/media/Bitmap_ClientOnly.php index 56b20acba5..3ec87723e9 100644 --- a/includes/media/Bitmap_ClientOnly.php +++ b/includes/media/Bitmap_ClientOnly.php @@ -35,7 +35,7 @@ class BitmapHandler_ClientOnly extends BitmapHandler { /** * @param File $image - * @param array $params + * @param array &$params * @return bool */ function normaliseParams( $image, &$params ) { diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 69982c2fb4..6cac1261c7 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -1675,7 +1675,7 @@ class FormatMetadata extends ContextSource { * * @param File $file File to use * @param array $extendedMetadata - * @param int $maxCacheTime Hook handlers might use this parameter to override cache time + * @param int &$maxCacheTime Hook handlers might use this parameter to override cache time * * @return array [ => ['value' => ]], or [] on error * @since 1.23 @@ -1772,7 +1772,7 @@ class FormatMetadata extends ContextSource { /** * Takes an array returned by the getExtendedMetadata* functions, * and resolves multi-language values in it. - * @param array $metadata + * @param array &$metadata * @since 1.23 */ protected function resolveMultilangMetadata( &$metadata ) { @@ -1789,7 +1789,7 @@ class FormatMetadata extends ContextSource { /** * Takes an array returned by the getExtendedMetadata* functions, * and turns all fields into single-valued ones by dropping extra values. - * @param array $metadata + * @param array &$metadata * @since 1.25 */ protected function discardMultipleValues( &$metadata ) { @@ -1810,7 +1810,7 @@ class FormatMetadata extends ContextSource { /** * Makes sure the given array is a valid API response fragment - * @param array $arr + * @param array &$arr */ protected function sanitizeArrayForAPI( &$arr ) { if ( !is_array( $arr ) ) { diff --git a/includes/media/ImageHandler.php b/includes/media/ImageHandler.php index 158c0dc6ea..1eefddbd4f 100644 --- a/includes/media/ImageHandler.php +++ b/includes/media/ImageHandler.php @@ -80,7 +80,7 @@ abstract class ImageHandler extends MediaHandler { /** * @param File $image - * @param array $params + * @param array &$params * @return bool */ function normaliseParams( $image, &$params ) { @@ -152,8 +152,8 @@ abstract class ImageHandler extends MediaHandler { /** * Validate thumbnail parameters and fill in the correct height * - * @param int $width Specified width (input/output) - * @param int $height Height (output only) + * @param int &$width Specified width (input/output) + * @param int &$height Height (output only) * @param int $srcWidth Width of the source image * @param int $srcHeight Height of the source image * @param string $mimeType Unused diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 76c979e0a4..ee8888c3e0 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -85,7 +85,7 @@ abstract class MediaHandler { * Should be idempotent. * Returns false if the parameters are unacceptable and the transform should fail * @param File $image - * @param array $params + * @param array &$params */ abstract function normaliseParams( $image, &$params ); @@ -712,7 +712,7 @@ abstract class MediaHandler { * * @see LocalFile::purgeThumbnails * - * @param array $files + * @param array &$files * @param array $options Purge options. Currently will always be * an array with a single key 'forThumbRefresh' set to true. */ diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 1bc722c5dc..bd78b49e5d 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -126,7 +126,7 @@ class SvgHandler extends ImageHandler { /** * @param File $image - * @param array $params + * @param array &$params * @return bool */ function normaliseParams( $image, &$params ) { diff --git a/includes/media/TransformationalImageHandler.php b/includes/media/TransformationalImageHandler.php index 742a5b7f61..32208cca70 100644 --- a/includes/media/TransformationalImageHandler.php +++ b/includes/media/TransformationalImageHandler.php @@ -36,7 +36,7 @@ use MediaWiki\MediaWikiServices; abstract class TransformationalImageHandler extends ImageHandler { /** * @param File $image - * @param array $params Transform parameters. Entries with the keys 'width' + * @param array &$params Transform parameters. Entries with the keys 'width' * and 'height' are the respective screen width and height, while the keys * 'physicalWidth' and 'physicalHeight' indicate the thumbnail dimensions. * @return bool @@ -588,7 +588,7 @@ abstract class TransformationalImageHandler extends ImageHandler { * Runs the 'BitmapHandlerCheckImageArea' hook. * * @param File $file - * @param array $params + * @param array &$params * @return bool * @since 1.25 */ diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 70795eccd9..3cce530c3c 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -672,7 +672,7 @@ class SqlBagOStuff extends BagOStuff { * On typical message and page data, this can provide a 3X decrease * in storage requirements. * - * @param mixed $data + * @param mixed &$data * @return string */ protected function serialize( &$data ) { diff --git a/includes/page/Article.php b/includes/page/Article.php index 33f7d4718d..7311f71dec 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2580,7 +2580,7 @@ class Article implements Page { /** * @param array $limit * @param array $expiry - * @param bool $cascade + * @param bool &$cascade * @param string $reason * @param User $user * @return Status @@ -2594,7 +2594,7 @@ class Article implements Page { /** * @param array $limit * @param string $reason - * @param int $cascade + * @param int &$cascade * @param array $expiry * @return bool */ @@ -2615,7 +2615,7 @@ class Article implements Page { * @param bool $suppress * @param int $u1 Unused * @param bool $u2 Unused - * @param string $error + * @param string &$error * @return bool */ public function doDeleteArticle( @@ -2629,7 +2629,7 @@ class Article implements Page { * @param string $summary * @param string $token * @param bool $bot - * @param array $resultDetails + * @param array &$resultDetails * @param User|null $user * @return array */ @@ -2642,7 +2642,7 @@ class Article implements Page { * @param string $fromP * @param string $summary * @param bool $bot - * @param array $resultDetails + * @param array &$resultDetails * @param User|null $guser * @return array */ @@ -2652,7 +2652,7 @@ class Article implements Page { } /** - * @param bool $hasHistory + * @param bool &$hasHistory * @return mixed */ public function generateReason( &$hasHistory ) { diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index af906fb44f..4f4decfbdd 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3001,7 +3001,7 @@ class WikiPage implements Page, IDBAccessObject { * @param string $token Rollback token. * @param bool $bot If true, mark all reverted edits as bot. * - * @param array $resultDetails Array contains result-specific array of additional values + * @param array &$resultDetails Array contains result-specific array of additional values * 'alreadyrolled' : 'current' (rev) * success : 'summary' (str), 'current' (rev), 'target' (rev) * @@ -3053,7 +3053,7 @@ class WikiPage implements Page, IDBAccessObject { * @param string $summary Custom summary. Set to default summary if empty. * @param bool $bot If true, mark all reverted edits as bot. * - * @param array $resultDetails Contains result-specific array of additional values + * @param array &$resultDetails Contains result-specific array of additional values * @param User $guser The user performing the rollback * @param array|null $tags Change tags to apply to the rollback * Callers are responsible for permission checks diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index d2a0a1a6d4..bc5182c1dd 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -264,7 +264,7 @@ class LinkHolderArray { /** * Replace link placeholders with actual links, in the buffer * - * @param string $text + * @param string &$text */ public function replace( &$text ) { $this->replaceInternal( $text ); @@ -273,7 +273,7 @@ class LinkHolderArray { /** * Replace internal links - * @param string $text + * @param string &$text */ protected function replaceInternal( &$text ) { if ( !$this->internals ) { @@ -416,7 +416,7 @@ class LinkHolderArray { /** * Replace interwiki links - * @param string $text + * @param string &$text */ protected function replaceInterwiki( &$text ) { if ( empty( $this->interwikis ) ) { @@ -444,7 +444,7 @@ class LinkHolderArray { /** * Modify $this->internals and $colours according to language variant linking rules - * @param array $colours + * @param array &$colours */ protected function doVariants( &$colours ) { global $wgContLang; diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 88439db98a..74ffc888eb 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -972,7 +972,7 @@ class Parser { * * @param array $elements List of element names. Comments are always extracted. * @param string $text Source text string. - * @param array $matches Out parameter, Array: extracted tags + * @param array &$matches Out parameter, Array: extracted tags * @param string|null $uniq_prefix * @return string Stripped text * @since 1.26 The uniq_prefix argument is deprecated. @@ -2103,7 +2103,7 @@ class Parser { /** * Process [[ ]] wikilinks (RIL) - * @param string $s + * @param string &$s * @throws MWException * @return LinkHolderArray * @@ -4536,7 +4536,7 @@ class Parser { * Do not reuse this parser instance after calling getUserSig(), * as it may have changed if it's the $wgParser. * - * @param User $user + * @param User &$user * @param string|bool $nickname Nickname to use or false to use user's default nickname * @param bool|null $fancySig whether the nicknname is the complete signature * or null to use default value @@ -4897,7 +4897,7 @@ class Parser { * Replace "" link placeholders with actual links, in the buffer * Placeholders created in Linker::link() * - * @param string $text + * @param string &$text * @param int $options */ public function replaceLinkHolders( &$text, $options = 0 ) { @@ -5406,7 +5406,7 @@ class Parser { * Callback from the Sanitizer for expanding items found in HTML attribute * values, so they can be safely tested and escaped. * - * @param string $text + * @param string &$text * @param bool|PPFrame $frame * @return string */ diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index 252a227a1d..4da7976d82 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -164,7 +164,7 @@ abstract class Profiler { abstract public function scopedProfileIn( $section ); /** - * @param SectionProfileCallback $section + * @param SectionProfileCallback &$section */ public function scopedProfileOut( SectionProfileCallback &$section = null ) { $section = null; diff --git a/includes/profiler/SectionProfiler.php b/includes/profiler/SectionProfiler.php index fdfb24d8c4..db5ccafe4b 100644 --- a/includes/profiler/SectionProfiler.php +++ b/includes/profiler/SectionProfiler.php @@ -66,7 +66,7 @@ class SectionProfiler { } /** - * @param ScopedCallback $section + * @param ScopedCallback &$section */ public function scopedProfileOut( ScopedCallback &$section ) { $section = null; diff --git a/includes/revisiondelete/RevisionDeleter.php b/includes/revisiondelete/RevisionDeleter.php index b834c15367..4a807fbc7e 100644 --- a/includes/revisiondelete/RevisionDeleter.php +++ b/includes/revisiondelete/RevisionDeleter.php @@ -98,7 +98,7 @@ class RevisionDeleter { * @param int $field The bitmask describing the single option. * @param int $diff The xor of the old and new bitfields. * @param int $new The new bitfield - * @param array $arr The array to update. + * @param array &$arr The array to update. */ protected static function checkItem( $desc, $field, $diff, $new, &$arr ) { if ( $diff & $field ) { diff --git a/includes/search/SearchHighlighter.php b/includes/search/SearchHighlighter.php index cebdb40dbb..6135395aeb 100644 --- a/includes/search/SearchHighlighter.php +++ b/includes/search/SearchHighlighter.php @@ -291,8 +291,8 @@ class SearchHighlighter { /** * Split text into lines and add it to extracts array * - * @param array $extracts Index -> $line - * @param int $count + * @param array &$extracts Index -> $line + * @param int &$count * @param string $text */ function splitAndAdd( &$extracts, &$count, $text ) { @@ -326,8 +326,8 @@ class SearchHighlighter { * @param string $text * @param int $start * @param int $end - * @param int $posStart (out) actual start position - * @param int $posEnd (out) actual end position + * @param int &$posStart (out) actual start position + * @param int &$posEnd (out) actual end position * @return string */ function extract( $text, $start, $end, &$posStart = null, &$posEnd = null ) { @@ -397,10 +397,10 @@ class SearchHighlighter { * * @param string $pattern Regexp for matching lines * @param array $extracts Extracts to search - * @param int $linesleft Number of extracts to make - * @param int $contextchars Length of snippet - * @param array $out Map for highlighted snippets - * @param array $offsets Map of starting points of snippets + * @param int &$linesleft Number of extracts to make + * @param int &$contextchars Length of snippet + * @param array &$out Map for highlighted snippets + * @param array &$offsets Map of starting points of snippets * @protected */ function process( $pattern, $extracts, &$linesleft, &$contextchars, &$out, &$offsets ) { diff --git a/includes/search/SearchMySQL.php b/includes/search/SearchMySQL.php index 2ea960555b..77dcfe9ce2 100644 --- a/includes/search/SearchMySQL.php +++ b/includes/search/SearchMySQL.php @@ -218,7 +218,7 @@ class SearchMySQL extends SearchDatabase { /** * Add special conditions - * @param array $query + * @param array &$query * @since 1.18 */ protected function queryFeatures( &$query ) { @@ -231,7 +231,7 @@ class SearchMySQL extends SearchDatabase { /** * Add namespace conditions - * @param array $query + * @param array &$query * @since 1.18 (changed) */ function queryNamespaces( &$query ) { @@ -245,7 +245,7 @@ class SearchMySQL extends SearchDatabase { /** * Add limit options - * @param array $query + * @param array &$query * @since 1.18 */ protected function limitResult( &$query ) { diff --git a/includes/skins/QuickTemplate.php b/includes/skins/QuickTemplate.php index e0ceab5215..e7120e9703 100644 --- a/includes/skins/QuickTemplate.php +++ b/includes/skins/QuickTemplate.php @@ -92,14 +92,14 @@ abstract class QuickTemplate { /** * @param string $name - * @param mixed $value + * @param mixed &$value */ public function setRef( $name, &$value ) { $this->data[$name] =& $value; } /** - * @param MediaWikiI18N $t + * @param MediaWikiI18N &$t */ public function setTranslator( &$t ) { $this->translator = &$t; diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 849362aae7..e1d0034675 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -449,7 +449,7 @@ abstract class Skin extends ContextSource { * "" tag, skins can override it if they have a need to add in any * body attributes or classes of their own. * @param OutputPage $out - * @param array $bodyAttrs + * @param array &$bodyAttrs */ function addToBodyAttributes( $out, &$bodyAttrs ) { // does nothing by default @@ -1215,7 +1215,7 @@ abstract class Skin extends ContextSource { /** * make sure we have some title to operate on * - * @param Title $title + * @param Title &$title * @param string $name */ static function checkTitle( &$title, $name ) { @@ -1286,7 +1286,7 @@ abstract class Skin extends ContextSource { * * This is just a wrapper around addToSidebarPlain() for backwards compatibility * - * @param array $bar + * @param array &$bar * @param string $message */ public function addToSidebar( &$bar, $message ) { @@ -1296,7 +1296,7 @@ abstract class Skin extends ContextSource { /** * Add content from plain text * @since 1.17 - * @param array $bar + * @param array &$bar * @param string $text * @return array */ diff --git a/includes/specialpage/AuthManagerSpecialPage.php b/includes/specialpage/AuthManagerSpecialPage.php index fbc3022a43..9b77b73dc0 100644 --- a/includes/specialpage/AuthManagerSpecialPage.php +++ b/includes/specialpage/AuthManagerSpecialPage.php @@ -45,7 +45,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { * @param AuthenticationRequest[] $requests * @param array $fieldInfo Field information array (union of all * AuthenticationRequest::getFieldInfo() responses). - * @param array $formDescriptor HTMLForm descriptor. The special key 'weight' can be set to + * @param array &$formDescriptor HTMLForm descriptor. The special key 'weight' can be set to * change the order of the fields. * @param string $action Authentication type (one of the AuthManager::ACTION_* constants) * @return bool @@ -709,7 +709,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage { * Sort the fields of a form descriptor by their 'weight' property. (Fields with higher weight * are shown closer to the bottom; weight defaults to 0. Negative weight is allowed.) * Keep order if weights are equal. - * @param array $formDescriptor + * @param array &$formDescriptor * @return array */ protected static function sortFormDescriptorFields( array &$formDescriptor ) { diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 9d6fd5bad0..2dccee1f8c 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -1339,7 +1339,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { } /** - * @param array $formDescriptor + * @param array &$formDescriptor */ protected function postProcessFormDescriptor( &$formDescriptor, $requests ) { // Pre-fill username (if not creating an account, T46775). diff --git a/includes/specialpage/SpecialPageFactory.php b/includes/specialpage/SpecialPageFactory.php index 8dcb30c907..4433ddb7d6 100644 --- a/includes/specialpage/SpecialPageFactory.php +++ b/includes/specialpage/SpecialPageFactory.php @@ -501,8 +501,8 @@ class SpecialPageFactory { * Returns a title object if the page is redirected, false if there was no such special * page, and true if it was successful. * - * @param Title $title - * @param IContextSource $context + * @param Title &$title + * @param IContextSource &$context * @param bool $including Bool output is being captured for use in {{special:whatever}} * @param LinkRenderer|null $linkRenderer (since 1.28) * diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index 04c04b239c..66e4fbeda2 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -233,7 +233,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 + * @param array &$fields HTMLForm descriptor array * @return bool Whether fields were altered (that is, whether the target is * already blocked) */ diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 41007e274a..0b48d4081c 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -868,7 +868,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { /** * Filter $rows by categories set in $opts * - * @param ResultWrapper $rows Database rows + * @param ResultWrapper &$rows Database rows * @param FormOptions $opts */ function filterByCategories( &$rows, FormOptions $opts ) { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 8afea0b295..85b4572bd5 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -555,7 +555,7 @@ class SpecialSearch extends SpecialPage { * Extract "power search" namespace settings from the request object, * returning a list of index numbers to search. * - * @param WebRequest $request + * @param WebRequest &$request * @return array */ protected function powerSearch( &$request ) { diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 660c5b7e67..7feee85e38 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -155,7 +155,7 @@ abstract class UploadBase { /** * Create a form of UploadBase depending on wpSourceType and initializes it * - * @param WebRequest $request + * @param WebRequest &$request * @param string|null $type * @return null|UploadBase */ @@ -241,7 +241,7 @@ abstract class UploadBase { /** * Initialize from a WebRequest. Override this in a subclass. * - * @param WebRequest $request + * @param WebRequest &$request */ abstract public function initializeFromRequest( &$request ); diff --git a/includes/upload/UploadFromFile.php b/includes/upload/UploadFromFile.php index acfabbac26..675bb8d453 100644 --- a/includes/upload/UploadFromFile.php +++ b/includes/upload/UploadFromFile.php @@ -34,7 +34,7 @@ class UploadFromFile extends UploadBase { protected $mUpload = null; /** - * @param WebRequest $request + * @param WebRequest &$request */ function initializeFromRequest( &$request ) { $upload = $request->getUpload( 'wpUploadFile' ); diff --git a/includes/upload/UploadFromStash.php b/includes/upload/UploadFromStash.php index 1fbdb7d86d..a9f399b7cc 100644 --- a/includes/upload/UploadFromStash.php +++ b/includes/upload/UploadFromStash.php @@ -113,7 +113,7 @@ class UploadFromStash extends UploadBase { } /** - * @param WebRequest $request + * @param WebRequest &$request */ public function initializeFromRequest( &$request ) { // sends wpSessionKey as a default when wpFileKey is missing diff --git a/includes/upload/UploadFromUrl.php b/includes/upload/UploadFromUrl.php index 2b13dd8b52..7d697a1902 100644 --- a/includes/upload/UploadFromUrl.php +++ b/includes/upload/UploadFromUrl.php @@ -141,7 +141,7 @@ class UploadFromUrl extends UploadBase { /** * Entry point for SpecialUpload - * @param WebRequest $request + * @param WebRequest &$request */ public function initializeFromRequest( &$request ) { $desiredDestName = $request->getText( 'wpDestFile' ); diff --git a/includes/user/User.php b/includes/user/User.php index fa84c94ca7..d6b63a8e31 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -3661,7 +3661,7 @@ class User implements IDBAccessObject { * If e-notif e-mails are on, they will receive notification mails on * the next change of the page if it's watched etc. * @note If the user doesn't have 'editmywatchlist', this will do nothing. - * @param Title $title Title of the article to look at + * @param Title &$title Title of the article to look at * @param int $oldid The revision id being viewed. If not given or 0, latest revision is assumed. */ public function clearNotification( &$title, $oldid = 0 ) { -- 2.20.1