From 3bd749d50e5ae92bcc9e03118dad1127dfd3cff8 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 28 Nov 2024 14:04:27 +1300 Subject: [PATCH] API Explicity mark nullable parameters for PHP 8.4 --- src/Security/LogInAuthenticationHandler.php | 4 ++-- src/Security/LogOutAuthenticationHandler.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Security/LogInAuthenticationHandler.php b/src/Security/LogInAuthenticationHandler.php index f68453f..055bd4a 100644 --- a/src/Security/LogInAuthenticationHandler.php +++ b/src/Security/LogInAuthenticationHandler.php @@ -75,7 +75,7 @@ public function authenticateRequest(HTTPRequest $request) * @param HTTPRequest|null $request * @throws InvalidArgumentException */ - public function logIn(Member $member, $persistent = false, HTTPRequest $request = null) + public function logIn(Member $member, $persistent = false, ?HTTPRequest $request = null) { // Fall back to retrieving request from current Controller if available if ($request === null) { @@ -108,7 +108,7 @@ public function logIn(Member $member, $persistent = false, HTTPRequest $request /** * @param HTTPRequest $request|null */ - public function logOut(HTTPRequest $request = null) + public function logOut(?HTTPRequest $request = null) { // noop } diff --git a/src/Security/LogOutAuthenticationHandler.php b/src/Security/LogOutAuthenticationHandler.php index a5a3310..a1c55e0 100644 --- a/src/Security/LogOutAuthenticationHandler.php +++ b/src/Security/LogOutAuthenticationHandler.php @@ -32,7 +32,7 @@ public function authenticateRequest(HTTPRequest $request) * @param bool $persistent * @param HTTPRequest $request|null */ - public function logIn(Member $member, $persistent = false, HTTPRequest $request = null) + public function logIn(Member $member, $persistent = false, ?HTTPRequest $request = null) { // noop } @@ -41,7 +41,7 @@ public function logIn(Member $member, $persistent = false, HTTPRequest $request * @param HTTPRequest $request|null * @throws InvalidArgumentException */ - public function logOut(HTTPRequest $request = null) + public function logOut(?HTTPRequest $request = null) { // Fall back to retrieving request from current Controller if available if ($request === null) {