From ee4d9dd5d5a94eb7cf760efafda33b45da7c1893 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sat, 26 Oct 2024 15:08:21 +0200 Subject: [PATCH] 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: I867b777f6799a383f1a19165fbaa7b4c0d47d76c --- src/OATHAuthServices.php | 2 +- src/OATHUser.php | 2 +- src/Special/OATHManage.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OATHAuthServices.php b/src/OATHAuthServices.php index 618f892c..3663e047 100644 --- a/src/OATHAuthServices.php +++ b/src/OATHAuthServices.php @@ -42,7 +42,7 @@ class OATHAuthServices { * @param MediaWikiServices|null $services * @return OATHAuthServices */ - public static function getInstance( MediaWikiServices $services = null ): OATHAuthServices { + public static function getInstance( ?MediaWikiServices $services = null ): OATHAuthServices { return new self( $services ?? MediaWikiServices::getInstance(), ); diff --git a/src/OATHUser.php b/src/OATHUser.php index abae6570..3ee6d5c8 100644 --- a/src/OATHUser.php +++ b/src/OATHUser.php @@ -123,7 +123,7 @@ class OATHUser { * * @param IModule|null $module */ - public function setModule( IModule $module = null ) { + public function setModule( ?IModule $module = null ) { $this->module = $module; } diff --git a/src/Special/OATHManage.php b/src/Special/OATHManage.php index 95e91866..6e000e61 100644 --- a/src/Special/OATHManage.php +++ b/src/Special/OATHManage.php @@ -231,7 +231,7 @@ class OATHManage extends SpecialPage { return $modulePanel; } - private function addCustomContent( IModule $module, PanelLayout $panel = null ): void { + private function addCustomContent( IModule $module, ?PanelLayout $panel = null ): void { $form = $module->getManageForm( $this->action, $this->authUser,