mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
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:
parent
cdb2b8804f
commit
f4dd8ea227
|
@ -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" />
|
||||
|
||||
<rule ref="MediaWiki.Commenting.ClassLevelLicense">
|
||||
<properties>
|
||||
|
|
|
@ -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' );
|
||||
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue