Skip to content

Commit

Permalink
Merge "client: Use type-declaration on undocumented private functions"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jan 24, 2025
2 parents a05d29c + 8c2d9d7 commit f922467
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/includes/Hooks/BeforePageDisplayHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down
2 changes: 1 addition & 1 deletion client/includes/Hooks/SiteLinksForDisplayLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 1 addition & 1 deletion client/includes/RecentChanges/ChangeLineFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 2 additions & 2 deletions client/includes/Specials/SpecialPagesWithBadges.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function execute( $subPage ) {
}
}

private function prepareParams( $subPage ) {
private function prepareParams( ?string $subPage ) {
$badge = $this->getRequest()->getText( 'badge', $subPage ?: '' );

try {
Expand Down Expand Up @@ -141,7 +141,7 @@ public function getPageHeader() {
->getHTML( '' );
}

private function getOptionsArray() {
private function getOptionsArray(): array {
/** @var ItemId[] $badgeItemIds */
$badgeItemIds = array_map(
function( $badgeId ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit f922467

Please sign in to comment.