aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerconnect.php
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2020-04-24 16:36:12 +0200
committerVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2020-04-25 17:44:38 +0200
commit385b3f4adf86606e03941171c136d8f2eb2b35c2 (patch)
tree2231cf04d67a5cae7284364ac5552a321b9a236e /app/class/Controllerconnect.php
parent03d425bdd9a639446ae72ce6556d753f2f162f83 (diff)
downloadwcms-385b3f4adf86606e03941171c136d8f2eb2b35c2.tar.gz
wcms-385b3f4adf86606e03941171c136d8f2eb2b35c2.zip
fix: most of PHPStan errors
Diffstat (limited to 'app/class/Controllerconnect.php')
-rw-r--r--app/class/Controllerconnect.php7
1 files changed, 3 insertions, 4 deletions
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);
}
/**