Hook interface doc comment followup

Mostly just narrower array types. A handful of other errors fixed.

Change-Id: Ied79d9e389867911bf83696dbb47f43305f8be7b
This commit is contained in:
Tim Starling 2020-04-20 16:03:16 +10:00
parent c44488f725
commit 0b7295a5cd
66 changed files with 87 additions and 83 deletions

View file

@ -14,7 +14,7 @@ interface AfterBuildFeedLinksHook {
*
* @since 1.35
*
* @param array &$feedLinks Array of created feed links
* @param string[] &$feedLinks Array of created feed links
* @return bool|void True or no return value to continue or false to abort
*/
public function onAfterBuildFeedLinks( &$feedLinks );

View file

@ -17,7 +17,7 @@ interface ArticleUpdateBeforeRedirectHook {
*
* @param Article $article
* @param string &$sectionanchor Section anchor link (e.g. "#overview" )
* @param array &$extraq Extra query parameters which can be added via hooked functions
* @param string[] &$extraq Extra query parameters which can be added via hooked functions
* @return bool|void True or no return value to continue or false to abort
*/
public function onArticleUpdateBeforeRedirect( $article, &$sectionanchor,

View file

@ -19,7 +19,7 @@ interface BeforeInitializeHook {
* @since 1.35
*
* @param Title $title Title being used for request
* @param ?mixed $unused Null
* @param null $unused Null
* @param OutputPage $output
* @param User $user
* @param WebRequest $request

View file

@ -2,6 +2,8 @@
namespace MediaWiki\Hook;
use Wikimedia\Rdbms\IResultWrapper;
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
/**
* @stable for implementation
@ -15,7 +17,7 @@ interface CategoryViewer__doCategoryQueryHook {
* @since 1.35
*
* @param string $type Category type, either 'page', 'file', or 'subcat'
* @param array $res Query result from Wikimedia\Rdbms\IDatabase::select()
* @param IResultWrapper $res Query result from Wikimedia\Rdbms\IDatabase::select()
* @return bool|void True or no return value to continue or false to abort
*/
public function onCategoryViewer__doCategoryQuery( $type, $res );

View file

@ -14,7 +14,7 @@ interface ContentSecurityPolicyDefaultSourceHook {
*
* @since 1.35
*
* @param array &$defaultSrc Array of Content-Security-Policy allowed sources
* @param string[] &$defaultSrc Array of Content-Security-Policy allowed sources
* @param array $policyConfig Current configuration for the Content-Security-Policy header
* @param string $mode ContentSecurityPolicy::REPORT_ONLY_MODE or
* ContentSecurityPolicy::FULL_MODE depending on type of header

View file

@ -13,7 +13,7 @@ interface ContentSecurityPolicyDirectivesHook {
*
* @since 1.35
*
* @param array &$directives Array of CSP directives
* @param string[] &$directives Array of CSP directives
* @param array $policyConfig Current configuration for the CSP header
* @param string $mode ContentSecurityPolicy::REPORT_ONLY_MODE or
* ContentSecurityPolicy::FULL_MODE depending on type of header

View file

@ -14,7 +14,7 @@ interface ContentSecurityPolicyScriptSourceHook {
*
* @since 1.35
*
* @param array &$scriptSrc Array of CSP directives
* @param string[] &$scriptSrc Array of CSP directives
* @param array $policyConfig Current configuration for the CSP header
* @param string $mode ContentSecurityPolicy::REPORT_ONLY_MODE or
* ContentSecurityPolicy::FULL_MODE depending on type of header

View file

@ -2,6 +2,7 @@
namespace MediaWiki\Hook;
use LocalFile;
use User;
use WikiFilePage;
@ -15,7 +16,7 @@ interface FileDeleteCompleteHook {
*
* @since 1.35
*
* @param string $file Reference to the deleted file
* @param LocalFile $file Reference to the deleted file
* @param string $oldimage In case of the deletion of an old image, the name of the old file
* @param WikiFilePage $article In case all revisions of the file are deleted, a reference to
* the WikiFilePage associated with the file

View file

@ -15,7 +15,7 @@ interface GetAutoPromoteGroupsHook {
* @since 1.35
*
* @param User $user User to promote
* @param array &$promote Groups that will be added
* @param string[] &$promote Groups that will be added
* @return bool|void True or no return value to continue or false to abort
*/
public function onGetAutoPromoteGroups( $user, &$promote );

View file

@ -15,8 +15,8 @@ interface GetCacheVaryCookiesHook {
* @since 1.35
*
* @param OutputPage $out
* @param array &$cookies Array of cookie names. Add a value to it if you want to add a cookie
* that has to vary cache options.
* @param string[] &$cookies Array of cookie names. Add a value to it if you
* want to add a cookie that has to vary cache options.
* @return bool|void True or no return value to continue or false to abort
*/
public function onGetCacheVaryCookies( $out, &$cookies );

View file

@ -13,7 +13,7 @@ interface GitViewersHook {
*
* @since 1.35
*
* @param array &$extTypes Associative array of repo URLS to viewer URLs
* @param string[] &$extTypes Associative array of repo URLS to viewer URLs
* @return bool|void True or no return value to continue or false to abort
*/
public function onGitViewers( &$extTypes );

View file

@ -30,7 +30,7 @@ interface ImageBeforeProduceHTMLHook {
* form, or false for current
* @param string &$res Final HTML output, used if you return false
* @param Parser $parser
* @param array &$query Query params for desc URL
* @param string &$query Query params for desc URL
* @param string &$widthOption Used by the parser to remember the user preference thumbnailsize
* @return bool|void True or no return value to continue or false to skip the default logic
*/

View file

@ -16,7 +16,7 @@ interface ImgAuthModifyHeadersHook {
* @since 1.35
*
* @param LinkTarget $title
* @param array &$headers HTTP headers ( name => value, names are case insensitive ).
* @param string[] &$headers HTTP headers ( name => value, names are case insensitive ).
* Two headers get special handling: If-Modified-Since (value must be
* a valid HTTP date) and Range (must be of the form "bytes=(\d*-\d*)")
* will be honored when streaming the file.

View file

@ -13,7 +13,7 @@ interface IsTrustedProxyHook {
* @since 1.35
*
* @param string $ip IP being checked
* @param array &$result Change this value to override the result of ProxyLookup::isTrustedProxy()
* @param bool &$result Change this value to override the result of ProxyLookup::isTrustedProxy()
* @return bool|void True or no return value to continue or false to abort
*/
public function onIsTrustedProxy( $ip, &$result );

View file

@ -17,7 +17,7 @@ interface LanguageLinksHook {
* @since 1.35
*
* @param Title $title
* @param array &$links Array with elements of the form "language:title" in the order
* @param string[] &$links Array with elements of the form "language:title" in the order
* that they will be output
* @param array &$linkFlags Associative array mapping prefixed links to arrays of flags.
* Currently unused, but planned to provide support for marking individual

View file

@ -15,7 +15,7 @@ interface LinkerMakeExternalLinkHook {
* @param string &$url Link URL
* @param string &$text Link text
* @param string &$link New link HTML (if returning false)
* @param array &$attribs Attributes to be applied
* @param string[] &$attribs Attributes to be applied
* @param string $linkType External link type
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -12,8 +12,8 @@ interface LocalisationIgnoredOptionalMessagesHook {
*
* @since 1.35
*
* @param array &$ignored Array of ignored message keys
* @param array &$optional Array of optional message keys
* @param string[] &$ignored Array of ignored message keys
* @param string[] &$optional Array of optional message keys
* @return bool|void True or no return value to continue or false to abort
*/
public function onLocalisationIgnoredOptionalMessages( &$ignored, &$optional );

View file

@ -20,7 +20,7 @@ interface OutputPageBodyAttributesHook {
*
* @param OutputPage $out OutputPage which called the hook, can be used to get the real title
* @param Skin $sk Skin that called OutputPage::headElement
* @param array &$bodyAttrs Array of attributes for the body tag passed to Html::openElement
* @param string[] &$bodyAttrs Array of attributes for the body tag passed to Html::openElement
* @return bool|void True or no return value to continue or false to abort
*/
public function onOutputPageBodyAttributes( $out, $sk, &$bodyAttrs );

View file

@ -15,7 +15,7 @@ interface OutputPageCheckLastModifiedHook {
*
* @since 1.35
*
* @param array &$modifiedTimes Array of timestamps.
* @param string[] &$modifiedTimes Array of timestamps.
* The following keys are set: page, user, epoch.
* @param OutputPage $out since 1.28
* @return bool|void True or no return value to continue or false to abort

View file

@ -15,7 +15,7 @@ interface OutputPageMakeCategoryLinksHook {
* @since 1.35
*
* @param OutputPage $out
* @param array $categories Associative array in which keys are category names and
* @param string[] $categories Associative array in which keys are category names and
* values are category types ("normal" or "hidden")
* @param array &$links Intended to hold the result. Associative array with
* category types as keys and arrays of HTML links as values.

View file

@ -14,7 +14,7 @@ interface ParserTestTablesHook {
*
* @since 1.35
*
* @param array &$tables Array of table names
* @param string[] &$tables Array of table names
* @return bool|void True or no return value to continue or false to abort
*/
public function onParserTestTables( &$tables );

View file

@ -3,6 +3,7 @@
namespace MediaWiki\Hook;
use TitleArray;
use Wikimedia\Rdbms\IResultWrapper;
/**
* @stable for implementation
@ -16,7 +17,7 @@ interface TitleArrayFromResultHook {
* @since 1.35
*
* @param TitleArray &$titleArray Set this to an object to override the default object returned
* @param array $res Database result used to create the object
* @param IResultWrapper $res Database result used to create the object
* @return bool|void True or no return value to continue or false to abort
*/
public function onTitleArrayFromResult( &$titleArray, $res );

View file

@ -16,7 +16,7 @@ interface TitleGetRestrictionTypesHook {
* @since 1.35
*
* @param Title $title Title in question
* @param array &$types Types of protection available
* @param string[] &$types Types of protection available
* @return bool|void True or no return value to continue or false to abort
*/
public function onTitleGetRestrictionTypes( $title, &$types );

View file

@ -15,7 +15,7 @@ interface TitleSquidURLsHook {
* @since 1.35
*
* @param Title $title Title object to purge
* @param array &$urls Array of URLs to purge from the caches, to be manipulated
* @param string[] &$urls Array of URLs to purge from the caches, to be manipulated
* @return bool|void True or no return value to continue or false to abort
*/
public function onTitleSquidURLs( $title, &$urls );

View file

@ -15,7 +15,7 @@ interface UserToolLinksEditHook {
*
* @param int $userId User ID of the current user
* @param string $userText Username of the current user
* @param array &$items Array of user tool links as HTML fragments
* @param string[] &$items Array of user tool links as HTML fragments
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserToolLinksEdit( $userId, $userText, &$items );

View file

@ -12,7 +12,7 @@ interface UserGetAllRightsHook {
*
* @since 1.35
*
* @param array &$rights Array of rights, which may be added to
* @param string[] &$rights Array of rights, which may be added to
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserGetAllRights( &$rights );

View file

@ -15,7 +15,7 @@ interface UserGetRightsHook {
* @since 1.35
*
* @param User $user User to get rights for
* @param array &$rights Current rights
* @param string[] &$rights Current rights
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserGetRights( $user, &$rights );

View file

@ -18,7 +18,7 @@ interface UserGetRightsRemoveHook {
* @since 1.35
*
* @param User $user User to get rights for
* @param array &$rights Current rights
* @param string[] &$rights Current rights
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserGetRightsRemove( $user, &$rights );

View file

@ -17,7 +17,7 @@ interface EnhancedChangesListModifyBlockLineDataHook {
* @since 1.35
*
* @param EnhancedChangesList $changesList
* @param string &$data Array of components that will be joined in order to create the line
* @param array &$data Array of components that will be joined in order to create the line
* @param RecentChange $rc RecentChange object for this line
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -20,8 +20,8 @@ interface EnhancedChangesListModifyLineDataHook {
* @param array &$data Array of components that will be joined in order to create the line
* @param RecentChange[] $block Array of RecentChange objects in that block
* @param RecentChange $rc RecentChange object for this line
* @param array &$classes Array of classes to change
* @param array &$attribs Associative array of other HTML attributes for the `<tr>` element.
* @param string[] &$classes Array of classes to change
* @param string[] &$attribs Associative array of other HTML attributes for the `<tr>` element.
* Currently only data attributes reserved to MediaWiki are allowed
* (see Sanitizer::isReservedDataAttribute).
* @return bool|void True or no return value to continue, or false to omit this line from

View file

@ -18,7 +18,7 @@ interface EnhancedChangesList__getLogTextHook {
* @since 1.35
*
* @param EnhancedChangesList $changesList
* @param array &$links Links generated by EnhancedChangesList
* @param string[] &$links Links generated by EnhancedChangesList
* @param RecentChange[] $block RecentChange objects in that block
* @return bool|void True or no return value to continue, or false to omit
* this line from recentchanges

View file

@ -19,7 +19,7 @@ interface MarkPatrolledHook {
* @param bool $wcOnlySysopsCanPatrol Config setting indicating whether the user needs to be a
* sysop in order to mark an edit patrolled
* @param bool $auto True if the edit is being marked as patrolled automatically
* @param array &$tags Tags to be applied to the patrol log entry
* @param string[] &$tags Tags to be applied to the patrol log entry
* @return bool|void True or no return value to continue or false to abort
*/
public function onMarkPatrolled( $rcid, $user, $wcOnlySysopsCanPatrol, $auto,

View file

@ -18,8 +18,8 @@ interface OldChangesListRecentChangesLineHook {
* @param OldChangesList $changeslist
* @param string &$s HTML of the form `<li>...</li>` containing one RC entry
* @param RecentChange $rc
* @param array &$classes Array of CSS classes for the `<li>` element
* @param array &$attribs Associative array of other HTML attributes for the `<li>` element.
* @param string[] &$classes Array of CSS classes for the `<li>` element
* @param string[] &$attribs Associative array of other HTML attributes for the `<li>` element.
* Currently only data attributes reserved to MediaWiki are allowed
* (see Sanitizer::isReservedDataAttribute).
* @return bool|void True or no return value to continue, or false to omit the line from

View file

@ -15,13 +15,13 @@ interface ChangeTagsAfterUpdateTagsHook {
*
* @since 1.35
*
* @param array $addedTags Tags effectively added in the update
* @param array $removedTags Tags effectively removed in the update
* @param array $prevTags Tags that were present prior to the update
* @param string[] $addedTags Tags effectively added in the update
* @param string[] $removedTags Tags effectively removed in the update
* @param string[] $prevTags Tags that were present prior to the update
* @param int $rc_id Recentchanges table id
* @param int $rev_id Revision table id
* @param int $log_id Logging table id
* @param array $params Tag params
* @param string|null $params Tag params
* @param RecentChange|null $rc RecentChange being tagged when the tagging accompanies the
* action, or null
* @param User|null $user User who performed the tagging when the tagging is subsequent to the

View file

@ -14,10 +14,10 @@ interface ChangeTagsAllowedAddHook {
*
* @since 1.35
*
* @param array &$allowedTags List of all the tags the user is allowed to add. Any tags the
* @param string[] &$allowedTags List of all the tags the user is allowed to add. Any tags the
* user wants to add ($addTags) that are not in this array will cause it to fail.
* You may add or remove tags to this array as required.
* @param array $addTags List of tags user intends to add
* @param string[] $addTags List of tags user intends to add
* @param User $user User who is adding the tags
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -12,7 +12,7 @@ interface ChangeTagsListActiveHook {
*
* @since 1.35
*
* @param array &$tags List of all active tags. Append to this array.
* @param string[] &$tags List of all active tags. Append to this array.
* @return bool|void True or no return value to continue or false to abort
*/
public function onChangeTagsListActive( &$tags );

View file

@ -12,7 +12,7 @@ interface ListDefinedTagsHook {
*
* @since 1.35
*
* @param array &$tags List of tags
* @param string[] &$tags List of tags
* @return bool|void True or no return value to continue or false to abort
*/
public function onListDefinedTags( &$tags );

View file

@ -13,7 +13,7 @@ interface GetContentModelsHook {
*
* @since 1.35
*
* @param array &$models Array containing current model list as strings. Extensions should add to this list.
* @param string[] &$models Array containing current model list as strings. Extensions should add to this list.
* @return bool|void True or no return value to continue or false to abort
*/
public function onGetContentModels( &$models );

View file

@ -17,7 +17,7 @@ interface DiffRevisionToolsHook {
* @since 1.35
*
* @param Revision $newRev New revision
* @param array &$links Array of HTML links
* @param string[] &$links Array of HTML links
* @param Revision|null $oldRev Old revision (may be null)
* @param User $user Current user
* @return bool|void True or no return value to continue or false to abort

View file

@ -12,7 +12,7 @@ interface LanguageGetTranslatedLanguageNamesHook {
*
* @since 1.35
*
* @param array &$names Array of language code => language name
* @param string[] &$names Array of language code => language name
* @param string $code Language of the preferred translations
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -22,11 +22,11 @@ interface HtmlPageLinkRendererBeginHook {
* @param string|HtmlArmor|null &$text Contents that the `<a>` tag should
* have; either a plain, unescaped string or an HtmlArmor object; null
* means "default"
* @param array &$customAttribs HTML attributes that the `<a>` tag should have, in
* @param string[] &$customAttribs HTML attributes that the `<a>` tag should have, in
* associative array form, with keys and values unescaped. Should be merged
* with default values, with a value of false meaning to suppress the
* attribute.
* @param array &$query Query string to add to the generated URL (the bit after the "?"),
* @param string[] &$query Query string to add to the generated URL (the bit after the "?"),
* in associative array form, with keys and values unescaped.
* @param string &$ret Value to return if your hook returns false
* @return bool|void True or no return value to continue, or false to skip default

View file

@ -22,7 +22,7 @@ interface HtmlPageLinkRendererEndHook {
* @param bool $isKnown Whether the page is known or not
* @param string|HtmlArmor &$text Contents that the `<a>` tag should have; either a plain,
* unescaped string or an HtmlArmor object
* @param array &$attribs Final HTML attributes of the `<a>` tag, after processing, in
* @param string[] &$attribs Final HTML attributes of the `<a>` tag, after processing, in
* associative array form
* @param string &$ret Value to return if your hook returns false
* @return bool|void True or no return value to continue or false to abort. If you return

View file

@ -21,13 +21,13 @@ interface LinkBeginHook {
* @param Title $target Title that the link is pointing to
* @param string|null &$html Contents that the `<a>` tag should have (raw HTML); null means
* "default"
* @param array &$customAttribs HTML attributes that the `<a>` tag should have, in
* @param string[] &$customAttribs HTML attributes that the `<a>` tag should have, in
* associative array form, with keys and values unescaped. Should be merged
* with default values, with a value of false meaning to suppress the
* attribute.
* @param array &$query Query string to add to the generated URL (the bit after the "?"),
* @param string[] &$query Query string to add to the generated URL (the bit after the "?"),
* in associative array form, with keys and values unescaped
* @param array &$options Array of options, which can include 'known', 'broken', 'noclasses'
* @param string[] &$options Array of options, which can include 'known', 'broken', 'noclasses'
* @param string &$ret Value to return if your hook returns false
* @return bool|void True or no return value to continue, or false to skip default
* processing and return $ret

View file

@ -18,10 +18,10 @@ interface LinkEndHook {
*
* @param Skin $skin
* @param Title $target Title that the link is pointing to
* @param array $options Array of options, which always includes either
* @param string[] $options Array of options, which always includes either
* 'known' or 'broken', and may include 'noclasses'
* @param string &$html Final (raw HTML) contents of the `<a>` tag, after processing
* @param array &$attribs Final HTML attributes of the `<a>` tag, after processing, in
* @param string[] &$attribs Final HTML attributes of the `<a>` tag, after processing, in
* associative array form
* @param string &$ret Value to return if your hook returns false
* @return bool|void True or no return value to continue or false to abort. If you return

View file

@ -18,8 +18,8 @@ interface LogEventsListLineEndingHook {
* @param LogEventsList $page
* @param string &$ret HTML line
* @param DatabaseLogEntry $entry DatabaseLogEntry object for this row
* @param array &$classes Classes to add to the surrounding `<li>`
* @param array &$attribs Associative array of other HTML attributes for the `<li>` element.
* @param string[] &$classes Classes to add to the surrounding `<li>`
* @param string[] &$attribs Associative array of other HTML attributes for the `<li>` element.
* Currently only data attributes reserved to MediaWiki are allowed
* (see Sanitizer::isReservedDataAttribute).
* @return bool|void True or no return value to continue or false to abort

View file

@ -12,7 +12,7 @@ interface UpdateUserMailerFormattedPageStatusHook {
*
* @since 1.35
*
* @param array &$formattedPageStatus List of valid page states
* @param string[] &$formattedPageStatus List of valid page states
* @return bool|void True or no return value to continue or false to abort
*/
public function onUpdateUserMailerFormattedPageStatus( &$formattedPageStatus );

View file

@ -16,8 +16,8 @@ interface ThumbnailBeforeProduceHTMLHook {
* @since 1.35
*
* @param ThumbnailImage $thumbnail
* @param array &$attribs Image attribute array
* @param array &$linkAttribs Image link attribute array
* @param string[] &$attribs Image attribute array
* @param string[] &$linkAttribs Image link attribute array
* @return bool|void True or no return value to continue or false to abort
*/
public function onThumbnailBeforeProduceHTML( $thumbnail, &$attribs,

View file

@ -17,7 +17,7 @@ interface Article__MissingArticleConditionsHook {
*
* @param array &$conds Array of query conditions (all of which have to be met;
* conditions will AND in the final query)
* @param array $logTypes Array of log types being queried
* @param string[] $logTypes Array of log types being queried
* @return bool|void True or no return value to continue or false to abort
*/
public function onArticle__MissingArticleConditions( &$conds, $logTypes );

View file

@ -14,9 +14,9 @@ interface GetLinkColoursHook {
*
* @since 1.35
*
* @param array $linkcolour_ids Array of prefixed DB keys of the pages linked to,
* @param string[] $linkcolour_ids Array of prefixed DB keys of the pages linked to,
* indexed by page_id
* @param array &$colours (Output) Array of CSS classes, indexed by prefixed DB keys
* @param string[] &$colours (Output) Array of CSS classes, indexed by prefixed DB keys
* @param Title $title Title of the page being parsed, on which the links will be shown
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -17,7 +17,7 @@ interface ResourceLoaderJqueryMsgModuleMagicWordsHook {
* @since 1.35
*
* @param ResourceLoaderContext $context
* @param array &$magicWords Associative array mapping all-caps magic word to a string value
* @param string[] &$magicWords Associative array mapping all-caps magic word to a string value
* @return bool|void True or no return value to continue or false to abort
*/
public function onResourceLoaderJqueryMsgModuleMagicWords( $context,

View file

@ -16,7 +16,7 @@ interface ArticleRevisionVisibilitySetHook {
* @since 1.35
*
* @param Title $title Title of the article
* @param array $ids IDs to set the visibility for
* @param int[] $ids IDs to set the visibility for
* @param array $visibilityChangeMap Map of revision ID to oldBits and newBits.
* This array can be examined to determine exactly what visibility bits
* have changed for each revision. This array is of the form:

View file

@ -13,7 +13,7 @@ interface PrefixSearchBackendHook {
*
* @since 1.35
*
* @param array $ns Array of int namespace keys to search in
* @param int[] $ns Array of int namespace keys to search in
* @param string $search Search term (not guaranteed to be conveniently normalized)
* @param int $limit Maximum number of results to return
* @param string[] &$results Out param: array of page names

View file

@ -13,7 +13,7 @@ interface PrefixSearchExtractNamespaceHook {
*
* @since 1.35
*
* @param array &$namespaces Array of int namespace keys to search in
* @param int[] &$namespaces Array of int namespace keys to search in
* (change this if you can extract namespaces)
* @param string &$search Search term (replace this with term without
* the namespace if you can extract one)

View file

@ -15,7 +15,7 @@ interface SearchGetNearMatchBeforeHook {
*
* @since 1.35
*
* @param array $allSearchTerms Array of the search terms in all content languages
* @param string[] $allSearchTerms Array of the search terms in all content languages
* @param Title|null &$titleResult Outparam; the value to return
* @return bool|void True or no return value to continue or false to abort
*/

View file

@ -12,7 +12,7 @@ interface SearchableNamespacesHook {
*
* @since 1.35
*
* @param array &$arr Array of namespaces ($nsId => $name) which will be used
* @param int[] &$arr Array of namespaces ($nsId => $name) which will be used
* @return bool|void True or no return value to continue or false to abort
*/
public function onSearchableNamespaces( &$arr );

View file

@ -23,9 +23,9 @@ interface ShowSearchHitTitleHook {
* @param array $terms Array of search terms extracted by SearchDatabase search engines
* (may not be populated by other search engines)
* @param SpecialSearch $specialSearch
* @param array &$query Array of query string parameters for the link representing the search
* @param string[] &$query Array of query string parameters for the link representing the search
* result
* @param array &$attributes Array of title link attributes, can be modified by extension
* @param string[] &$attributes Array of title link attributes, can be modified by extension
* @return bool|void True or no return value to continue or false to abort
*/
public function onShowSearchHitTitle( &$title, &$titleSnippet, $result, $terms,

View file

@ -14,9 +14,9 @@ interface SpecialSearchPowerBoxHook {
*
* @since 1.35
*
* @param array &$showSections Array to add values with more options to
* @param string[] &$showSections Array to add values with more options to
* @param string $term Search term (not a title object)
* @param array &$opts Array of hidden options (containing 'redirs' and 'profile')
* @param string[] &$opts Array of hidden options (containing 'redirs' and 'profile')
* @return bool|void True or no return value to continue or false to abort
*/
public function onSpecialSearchPowerBox( &$showSections, $term, &$opts );

View file

@ -18,7 +18,7 @@ interface SpecialSearchProfileFormHook {
* @param string &$form Form HTML
* @param string $profile Current search profile
* @param string $term Search term
* @param array $opts Key => value of hidden options for inclusion in custom forms
* @param string[] $opts Key => value of hidden options for inclusion in custom forms
* @return bool|void True or no return value to continue or false to abort
*/
public function onSpecialSearchProfileForm( $search, &$form, $profile, $term,

View file

@ -20,7 +20,7 @@ interface UserSetCookiesHook {
*
* @param User $user
* @param array &$session Session array, will be added to the session
* @param array &$cookies Cookies array mapping cookie name to its value
* @param string[] &$cookies Cookies array mapping cookie name to its value
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserSetCookies( $user, &$session, &$cookies );

View file

@ -14,7 +14,7 @@ interface WfShellWikiCmdHook {
* @since 1.35
*
* @param string &$script MediaWiki CLI script path
* @param array &$parameters Array of arguments and options to the script
* @param string[] &$parameters Array of arguments and options to the script
* @param array &$options Associative array of options, may contain the 'php' and 'wrapper'
* keys
* @return bool|void True or no return value to continue or false to abort

View file

@ -22,7 +22,7 @@ interface SkinTemplateTabActionHook {
* @param string $message Visible label of tab
* @param bool $selected Whether this is a selected tab
* @param bool $checkEdit Whether or not the action=edit query should be added if appropriate
* @param array &$classes Array of CSS classes to apply
* @param string[] &$classes Array of CSS classes to apply
* @param string &$query Query string to add to link
* @param string &$text Link text
* @param array &$result Complete associative array if you want to return true

View file

@ -14,7 +14,7 @@ interface RedirectSpecialArticleRedirectParamsHook {
*
* @since 1.35
*
* @param array &$redirectParams Array of parameters preserved by redirecting special pages
* @param string[] &$redirectParams Array of parameters preserved by redirecting special pages
* @return bool|void True or no return value to continue or false to abort
*/
public function onRedirectSpecialArticleRedirectParams( &$redirectParams );

View file

@ -20,7 +20,7 @@ interface CanonicalNamespacesHook {
*
* @since 1.35
*
* @param array &$namespaces Array of namespace numbers with corresponding canonical names
* @param string[] &$namespaces Array of namespace numbers with corresponding canonical names
* @return bool|void True or no return value to continue or false to abort
*/
public function onCanonicalNamespaces( &$namespaces );

View file

@ -24,7 +24,7 @@ interface UploadStashFileHook {
* @param array|null $props File properties, as returned by MWFileProps::getPropsFromPath().
* Note this is not always guaranteed to be set, e.g. in test scenarios. Call
* MWFileProps::getPropsFromPath() yourself in case you need the information.
* @param array|MessageSpecifier &$error Output: If the file stashing should
* @param array|MessageSpecifier|null &$error Output: If the file stashing should
* be prevented, set this to the reason in the form of [ messagename, param1, param2, ... ]
* or a MessageSpecifier instance. (You might want to use ApiMessage to provide machine
* -readable details for the API.)

View file

@ -14,7 +14,7 @@ interface GetLangPreferredVariantHook {
*
* @since 1.35
*
* @param string|bool &$req Language variant from the URL or boolean false if no variant
* @param string|null &$req Language variant from the URL or null if no variant
* was specified in the URL; the value of this variable comes from
* LanguageConverter#getURLVariant()
* @return bool|void True or no return value to continue or false to abort

View file

@ -14,7 +14,7 @@ interface LanguageGetNamespacesHook {
*
* @since 1.35
*
* @param array &$namespaces Array of namespaces indexed by their numbers
* @param string[] &$namespaces Array of namespaces indexed by their numbers
* @return bool|void True or no return value to continue or false to abort
*/
public function onLanguageGetNamespaces( &$namespaces );