From 385b3f4adf86606e03941171c136d8f2eb2b35c2 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Fri, 24 Apr 2020 16:36:12 +0200 Subject: fix: most of PHPStan errors --- app/class/Controllerconnect.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/class/Controllerconnect.php') diff --git a/app/class/Controllerconnect.php b/app/class/Controllerconnect.php index 24b0c3c..9dc788b 100644 --- a/app/class/Controllerconnect.php +++ b/app/class/Controllerconnect.php @@ -83,7 +83,7 @@ class Controllerconnect extends Controller /** * Create a token stored in the database and then a cookie * - * @return string|bool Token in cas of success, otherwise, false. + * @return string|false Token in cas of success, otherwise, false. */ public function createauthtoken() { @@ -95,9 +95,8 @@ class Controllerconnect extends Controller if ($cookiecreation) { return $tokenid; } - } else { - return false; } + return false; } /** @@ -112,7 +111,7 @@ class Controllerconnect extends Controller { $hash = secrethash($token); $cookie = $token . ':' . $hash; - return setcookie('authtoken', $cookie, time() + $conservation * 24 * 3600, null, null, false, true); + return setcookie('authtoken', $cookie, time() + $conservation * 24 * 3600, "", "", false, true); } /** -- cgit v1.2.3