diff --git a/client/includes/Hooks/BeforePageDisplayHandler.php b/client/includes/Hooks/BeforePageDisplayHandler.php index c4c9d6db61a..77266d08cab 100644 --- a/client/includes/Hooks/BeforePageDisplayHandler.php +++ b/client/includes/Hooks/BeforePageDisplayHandler.php @@ -80,7 +80,7 @@ private function addStyleModules( OutputPage $outputPage, Title $title, string $ } } - private function addJsModules( OutputPage $outputPage, Title $title, $actionName, Skin $skin ): void { + private function addJsModules( OutputPage $outputPage, Title $title, string $actionName, Skin $skin ): void { $user = $outputPage->getUser(); if ( $this->hasLinkItemWidget( $user, $outputPage, $title, $actionName ) ) { diff --git a/client/includes/Hooks/SiteLinksForDisplayLookup.php b/client/includes/Hooks/SiteLinksForDisplayLookup.php index c96157580a3..998cb793b3b 100644 --- a/client/includes/Hooks/SiteLinksForDisplayLookup.php +++ b/client/includes/Hooks/SiteLinksForDisplayLookup.php @@ -104,7 +104,7 @@ public function getSiteLinksForItemId( ItemId $itemId ) { return $this->getSiteLinksForItem( $item ); } - private function getSiteLinksForItem( Item $item ) { + private function getSiteLinksForItem( Item $item ): array { $siteLinks = $item->getSiteLinkList()->toArray(); $this->hookContainer->run( 'WikibaseClientSiteLinksForItem', [ diff --git a/client/includes/RecentChanges/ChangeLineFormatter.php b/client/includes/RecentChanges/ChangeLineFormatter.php index a33295f5a81..bd4251d4960 100644 --- a/client/includes/RecentChanges/ChangeLineFormatter.php +++ b/client/includes/RecentChanges/ChangeLineFormatter.php @@ -324,7 +324,7 @@ private function buildPermanentLinkHTML( EntityId $entityId, RevisionData $rev, ); } - private function buildDiffLinkHTML( EntityId $entityId, RevisionData $rev, $count ): string { + private function buildDiffLinkHTML( EntityId $entityId, RevisionData $rev, int $count ): string { $params = [ 'title' => $this->repoLinker->getEntityTitle( $entityId ), 'curid' => $rev->getPageId(), diff --git a/client/includes/Specials/SpecialPagesWithBadges.php b/client/includes/Specials/SpecialPagesWithBadges.php index 3c5ab964f71..0d79d7809ee 100644 --- a/client/includes/Specials/SpecialPagesWithBadges.php +++ b/client/includes/Specials/SpecialPagesWithBadges.php @@ -87,7 +87,7 @@ public function execute( $subPage ) { } } - private function prepareParams( $subPage ) { + private function prepareParams( ?string $subPage ) { $badge = $this->getRequest()->getText( 'badge', $subPage ?: '' ); try { @@ -141,7 +141,7 @@ public function getPageHeader() { ->getHTML( '' ); } - private function getOptionsArray() { + private function getOptionsArray(): array { /** @var ItemId[] $badgeItemIds */ $badgeItemIds = array_map( function( $badgeId ) { diff --git a/client/tests/phpunit/integration/includes/Usage/UsageLookupContractTester.php b/client/tests/phpunit/integration/includes/Usage/UsageLookupContractTester.php index 97d63a1025f..0f26581cca5 100644 --- a/client/tests/phpunit/integration/includes/Usage/UsageLookupContractTester.php +++ b/client/tests/phpunit/integration/includes/Usage/UsageLookupContractTester.php @@ -44,7 +44,7 @@ public function __construct( UsageLookup $lookup, $putUsagesCallback ) { $this->putUsagesCallback = $putUsagesCallback; } - private function putUsages( $pageId, array $usages ) { + private function putUsages( int $pageId, array $usages ) { call_user_func( $this->putUsagesCallback, $pageId, $usages ); } diff --git a/client/tests/phpunit/integration/includes/Usage/UsageTrackerContractTester.php b/client/tests/phpunit/integration/includes/Usage/UsageTrackerContractTester.php index 001d9077188..7b4ff601beb 100644 --- a/client/tests/phpunit/integration/includes/Usage/UsageTrackerContractTester.php +++ b/client/tests/phpunit/integration/includes/Usage/UsageTrackerContractTester.php @@ -52,7 +52,7 @@ private function getUsages( $pageId ) { return call_user_func( $this->getUsagesCallback, $pageId ); } - private function getTestUsages() { + private function getTestUsages(): array { $q3 = new ItemId( 'Q3' ); $q4 = new ItemId( 'Q4' ); $q5 = new ItemId( 'Q5' );