diff --git a/src/Cite.php b/src/Cite.php index bb9377807..ae984447c 100644 --- a/src/Cite.php +++ b/src/Cite.php @@ -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' ); diff --git a/tests/phpunit/integration/CiteTest.php b/tests/phpunit/integration/CiteTest.php index 7195cf5a6..d3b67cbee 100644 --- a/tests/phpunit/integration/CiteTest.php +++ b/tests/phpunit/integration/CiteTest.php @@ -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() ); diff --git a/tests/phpunit/unit/ErrorReporterTest.php b/tests/phpunit/unit/ErrorReporterTest.php index 22b027faf..5ec2e5743 100644 --- a/tests/phpunit/unit/ErrorReporterTest.php +++ b/tests/phpunit/unit/ErrorReporterTest.php @@ -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 );