Use explicit nullable type on parameter arguments (for PHP 8.4)

Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.

Bug: T376276
Change-Id: If9163b2bcdc105555ba3e4ed8bca651dbe0ac1bb
This commit is contained in:
Andre Klapper 2024-10-26 15:06:43 +02:00 committed by Umherirrender
parent 138912bc38
commit 7e9885793d
2 changed files with 2 additions and 4 deletions

View file

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Usage.NullableType.ExplicitNullableTypes" />
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />

View file

@ -190,7 +190,7 @@ class LintUpdateTest extends MediaWikiIntegrationTestCase {
$this->assertSame( 1, $hookCalled );
}
private function newRenderedRevision( WikiPage $page = null, RevisionRecord $rev = null ) {
private function newRenderedRevision( ?WikiPage $page = null, ?RevisionRecord $rev = null ) {
$page = $this->getExistingTestPage();
$title = $page->getTitle();