From 550f5930f2a78c72dbd6a4a1d16212e9391df978 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 1 May 2020 16:47:46 +1000 Subject: Hook interface type fixes, to fix Phan errors Phan flagged a lot of incorrect type hints when run against the call site migration patch. Bug: T240307 Change-Id: I698de5536446c241b200430198b21b72763b0c69 --- includes/skins/Hook/SkinBuildSidebarHook.php | 2 +- includes/skins/Hook/SkinEditSectionLinksHook.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/skins/Hook') diff --git a/includes/skins/Hook/SkinBuildSidebarHook.php b/includes/skins/Hook/SkinBuildSidebarHook.php index c1667a939024..aa0129cf7f3e 100644 --- a/includes/skins/Hook/SkinBuildSidebarHook.php +++ b/includes/skins/Hook/SkinBuildSidebarHook.php @@ -15,7 +15,7 @@ interface SkinBuildSidebarHook { * @since 1.35 * * @param Skin $skin - * @param string &$bar Sidebar contents. Modify $bar to add or modify sidebar portlets. + * @param array &$bar Sidebar contents. Modify $bar to add or modify sidebar portlets. * @return bool|void True or no return value to continue or false to abort */ public function onSkinBuildSidebar( $skin, &$bar ); diff --git a/includes/skins/Hook/SkinEditSectionLinksHook.php b/includes/skins/Hook/SkinEditSectionLinksHook.php index cc47dc6615b4..196ef78f272b 100644 --- a/includes/skins/Hook/SkinEditSectionLinksHook.php +++ b/includes/skins/Hook/SkinEditSectionLinksHook.php @@ -2,6 +2,7 @@ namespace MediaWiki\Hook; +use Language; use Skin; use Title; @@ -28,7 +29,7 @@ interface SkinEditSectionLinksHook { * - `text`: String for the text * - `attribs`: Array of attributes * - `query`: Array of query parameters to add to the URL - * @param string $lang Language code to use for the link in the wfMessage function + * @param Language $lang Language to use for the link in the wfMessage function * @return bool|void True or no return value to continue or false to abort */ public function onSkinEditSectionLinks( $skin, $title, $section, $tooltip, -- cgit v1.2.3