From 3428de03353908822d732c805901a09a9075e64c Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 28 Nov 2024 14:04:18 +1300 Subject: [PATCH] API Explicity mark nullable parameters for PHP 8.4 --- src/Authenticator.php | 4 ++-- src/RealMeService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Authenticator.php b/src/Authenticator.php index 33881b5..2df7e72 100644 --- a/src/Authenticator.php +++ b/src/Authenticator.php @@ -155,7 +155,7 @@ public function getLostPasswordHandler($link) * @param ValidationResult $result A validationresult which is either valid or contains the error message(s) * @return Member The matched member, or null if the authentication fails */ - public function authenticate(array $data, HTTPRequest $request, ValidationResult &$result = null) + public function authenticate(array $data, HTTPRequest $request, ?ValidationResult &$result = null) { try { $this->service->enforceLogin($request); @@ -189,7 +189,7 @@ public function authenticate(array $data, HTTPRequest $request, ValidationResult * @param ValidationResult $result * @return ValidationResult */ - public function checkPassword(Member $member, $password, ValidationResult &$result = null) + public function checkPassword(Member $member, $password, ?ValidationResult &$result = null) { // No-op } diff --git a/src/RealMeService.php b/src/RealMeService.php index c874625..347edca 100644 --- a/src/RealMeService.php +++ b/src/RealMeService.php @@ -907,7 +907,7 @@ private function getRequestedAuthnContext() * * @return Auth */ - public function getAuth(HTTPRequest $request = null) + public function getAuth(?HTTPRequest $request = null) { if (isset($this->auth)) { return $this->auth;