From abcd0e8ba205aac8bd9006e99d783afc999af0af Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 23 Nov 2024 17:43:24 +0000 Subject: Use native union types in most places. --- classes/Auth_Base.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'classes/Auth_Base.php') diff --git a/classes/Auth_Base.php b/classes/Auth_Base.php index d8128400d..35ff6be49 100644 --- a/classes/Auth_Base.php +++ b/classes/Auth_Base.php @@ -16,11 +16,10 @@ abstract class Auth_Base extends Plugin implements IAuthModule { * Can be used instead of find_user_by_login() by external auth modules * @param string $login * @param string|false $password - * @return null|int * @throws Exception * @throws PDOException */ - function auto_create_user(string $login, $password = false) { + function auto_create_user(string $login, false|string $password = false): ?int { if ($login && Config::get(Config::AUTH_AUTO_CREATE)) { $user_id = UserHelper::find_user_by_login($login); @@ -49,11 +48,9 @@ abstract class Auth_Base extends Plugin implements IAuthModule { /** replaced with UserHelper::find_user_by_login() - * @param string $login - * @return null|int * @deprecated */ - function find_user_by_login(string $login) { + function find_user_by_login(string $login): ?int { return UserHelper::find_user_by_login($login); } } -- cgit v1.2.3-54-g00ecf