mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Editcount
synced 2024-12-18 11:02:04 +00:00
Add a few language-level types to the PHP code
Change-Id: I7a718ebfcc42f4d9799c5ee48a58ad8abda43f73
This commit is contained in:
parent
e60fb431a8
commit
187b7edd13
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue