mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Editcount
synced 2024-12-19 03:21:11 +00:00
Merge "Add a few language-level types to the PHP code"
This commit is contained in:
commit
9d5df24ebc
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
class EditcountHTML extends Editcount {
|
class EditcountHTML extends Editcount {
|
||||||
/** @var int[] */
|
/** @var int[] */
|
||||||
private $nscount;
|
private array $nscount;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $total;
|
private int $total;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output the HTML form on Special:Editcount
|
* Output the HTML form on Special:Editcount
|
||||||
|
@ -15,7 +15,7 @@ class EditcountHTML extends Editcount {
|
||||||
* @param int[] $nscount
|
* @param int[] $nscount
|
||||||
* @param int|null $total
|
* @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->nscount = $nscount;
|
||||||
$this->total = $total ?: array_sum( $nscount );
|
$this->total = $total ?: array_sum( $nscount );
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class EditcountHTML extends Editcount {
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function makeTable() {
|
private function makeTable(): string {
|
||||||
$lang = $this->getLanguage();
|
$lang = $this->getLanguage();
|
||||||
|
|
||||||
$total = $this->msg( 'editcount_total' )->escaped();
|
$total = $this->msg( 'editcount_total' )->escaped();
|
||||||
|
|
Loading…
Reference in a new issue