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: I73a4ce1ecd9b4fe040e5bfd22889e783071fab0d
This commit is contained in:
Andre Klapper 2024-10-26 14:56:14 +02:00
parent 1824469ded
commit 41bafe6f2c
3 changed files with 3 additions and 3 deletions

View file

@ -305,7 +305,7 @@ class Cite {
private function formatReferences(
Parser $parser,
string $group,
string $responsive = null
?string $responsive = null
): string {
$responsiveReferences = $this->config->get( 'CiteResponsiveReferences' );

View file

@ -28,7 +28,7 @@ class CiteTest extends \MediaWikiIntegrationTestCase {
public function testParseArguments(
array $attributes,
array $expectedValue,
string $expectedError = null
?string $expectedError = null
) {
/** @var Cite $cite */
$cite = TestingAccessWrapper::newFromObject( $this->newCite() );

View file

@ -100,7 +100,7 @@ class ErrorReporterTest extends \MediaWikiUnitTestCase {
return new ErrorReporter( $mockMessageLocalizer );
}
private function createParser( Language $language, string $expectedCategory = null ): Parser {
private function createParser( Language $language, ?string $expectedCategory = null ): Parser {
$parserOptions = $this->createMock( ParserOptions::class );
$parserOptions->method( 'getUserLangObj' )->willReturn( $language );