aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/mocks
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2024-10-16 20:58:33 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2024-10-16 20:58:33 +0200
commite662614f95228614e575f6148678c35cdbc19f58 (patch)
treeb6786bcf09229a221b2dc086c6806350012df13d /tests/phpunit/mocks
parent544a959d5b8fe05bdb056e72279da118a1243ca8 (diff)
downloadmediawikicore-e662614f95228614e575f6148678c35cdbc19f58.tar.gz
mediawikicore-e662614f95228614e575f6148678c35cdbc19f58.zip
Use explicit nullable type on parameter arguments
Implicitly marking parameter $... as nullable is deprecated in php8.4, the explicit nullable type must be used instead Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a Break one long line in SpecialPage.php Bug: T376276 Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
Diffstat (limited to 'tests/phpunit/mocks')
-rw-r--r--tests/phpunit/mocks/permissions/MockAuthorityTrait.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/mocks/permissions/MockAuthorityTrait.php b/tests/phpunit/mocks/permissions/MockAuthorityTrait.php
index f2f48651b5ce..275423be8be1 100644
--- a/tests/phpunit/mocks/permissions/MockAuthorityTrait.php
+++ b/tests/phpunit/mocks/permissions/MockAuthorityTrait.php
@@ -269,7 +269,7 @@ trait MockAuthorityTrait {
private function mockAuthority(
UserIdentity $user,
callable $permissionCallback,
- Block $block = null,
+ ?Block $block = null,
bool $isTemp = false
): Authority {
$mock = $this->createMock( Authority::class );
@@ -428,7 +428,7 @@ trait MockAuthorityTrait {
return $permissionManager;
}
- private function newUser( Block $block = null, bool $isTemp = false ): User {
+ private function newUser( ?Block $block = null, bool $isTemp = false ): User {
/** @var User&MockObject $actor */
$actor = $this->createNoOpMock( User::class, [ 'getBlock', 'isNewbie', 'toRateLimitSubject' ] );
$actor->method( 'getBlock' )->willReturn( $block );