diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2024-10-16 20:58:33 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2024-10-16 20:58:33 +0200 |
commit | e662614f95228614e575f6148678c35cdbc19f58 (patch) | |
tree | b6786bcf09229a221b2dc086c6806350012df13d /tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php | |
parent | 544a959d5b8fe05bdb056e72279da118a1243ca8 (diff) | |
download | mediawikicore-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/unit/includes/Rest/Handler/HandlerTestTrait.php')
-rw-r--r-- | tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php b/tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php index cf0695c65072..3a64f2a7794d 100644 --- a/tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php +++ b/tests/phpunit/unit/includes/Rest/Handler/HandlerTestTrait.php @@ -52,8 +52,8 @@ trait HandlerTestTrait { RequestInterface $request, $config = [], $hooks = [], - Authority $authority = null, - Session $session = null, + ?Authority $authority = null, + ?Session $session = null, $routerOrModule = null ) { $formatter = $this->getDummyTextFormatter( true ); @@ -153,7 +153,7 @@ trait HandlerTestTrait { */ private function validateHandler( Handler $handler, - Validator $validator = null + ?Validator $validator = null ) { if ( !$validator ) { $serviceContainer = $this->getServiceContainer(); @@ -209,8 +209,8 @@ trait HandlerTestTrait { $hooks = [], $validatedParams = [], $validatedBody = [], - Authority $authority = null, - Session $session = null, + ?Authority $authority = null, + ?Session $session = null, $routerOrModule = null ): ResponseInterface { // supply defaults for required fields in $config @@ -262,8 +262,8 @@ trait HandlerTestTrait { $hooks = [], $validatedParams = [], $validatedBody = [], - Authority $authority = null, - Session $session = null + ?Authority $authority = null, + ?Session $session = null ): array { $response = $this->executeHandler( $handler, $request, $config, $hooks, $validatedParams, $validatedBody, $authority, $session ); |