From 81a10f69bcc38b62aad79f9be716adcf4ed49d2d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2021 10:48:32 +0300 Subject: deal with phpstan warnings related to base authentication modules --- classes/plugin.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'classes/plugin.php') diff --git a/classes/plugin.php b/classes/plugin.php index 638cc2f50..bcd8c0de7 100644 --- a/classes/plugin.php +++ b/classes/plugin.php @@ -141,8 +141,24 @@ abstract class Plugin { user_error("Dummy method invoked.", E_USER_ERROR); } - function hook_auth_user($login, $password, $service) { + /** this is a pluginhost compatibility wrapper that invokes $this->authenticate(...$args) (Auth_Base) + * @param mixed $args = ($login, $password, $service) + * @return int|false user_id + */ + function hook_auth_user(...$args) { user_error("Dummy method invoked.", E_USER_ERROR); + return false; + } + + /** IAuthModule only + * @param string $login + * @param string $password + * optional third string $service + * @return int|false user_id + */ + function authenticate($login, $password) { + user_error("Dummy method invoked.", E_USER_ERROR); + return false; } function hook_hotkey_map($hotkeys) { -- cgit v1.2.3