From 187b7edd13b9cf887da5657e1515dd3240de0660 Mon Sep 17 00:00:00 2001 From: thiemowmde Date: Wed, 6 Nov 2024 14:43:56 +0100 Subject: [PATCH] Add a few language-level types to the PHP code Change-Id: I7a718ebfcc42f4d9799c5ee48a58ad8abda43f73 --- src/EditcountHTML.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EditcountHTML.php b/src/EditcountHTML.php index aceb664..dd6afe4 100644 --- a/src/EditcountHTML.php +++ b/src/EditcountHTML.php @@ -2,10 +2,10 @@ class EditcountHTML extends Editcount { /** @var int[] */ - private $nscount; + private array $nscount; /** @var int */ - private $total; + private int $total; /** * Output the HTML form on Special:Editcount @@ -15,7 +15,7 @@ class EditcountHTML extends Editcount { * @param int[] $nscount * @param int|null $total */ - public function outputHTML( $username, $uid, array $nscount, $total = null ) { + public function outputHTML( string $username, int $uid, array $nscount, ?int $total = null ): void { $this->nscount = $nscount; $this->total = $total ?: array_sum( $nscount ); @@ -60,7 +60,7 @@ class EditcountHTML extends Editcount { * * @return string */ - private function makeTable() { + private function makeTable(): string { $lang = $this->getLanguage(); $total = $this->msg( 'editcount_total' )->escaped();