Merge "Add a few language-level types to the PHP code"

This commit is contained in:
jenkins-bot 2024-11-29 18:37:55 +00:00 committed by Gerrit Code Review
commit 9d5df24ebc

View file

@ -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();