aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-03-27 00:36:21 +0200
committerGravatar GitHub <noreply@github.com> 2023-03-27 00:36:21 +0200
commit0317683155a3966830f3972fde1562087f65cf94 (patch)
treed2806e337c54d449704e6a8f3f8d1887d6c174f2 /lib
parentf3af3f0f3d4da8023c5e918545d47a51afc4b6c1 (diff)
Add test and type hinting (#5087)
* - Add test and type hinting - pass PhpStan Level 9 * fix dump * fix style * fix visibility * fix style * add test * add test * add test * add test * add test * Simplify * cleaning after test * remove space * fix style * use specific log file for test * Remarque's from Alkarex * A few more details --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Session.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php
index 924e9f5f9..0ce6721e2 100644
--- a/lib/Minz/Session.php
+++ b/lib/Minz/Session.php
@@ -59,8 +59,8 @@ class Minz_Session {
* @param string $p le paramètre à récupérer
* @return mixed|false la valeur de la variable de session, false si n'existe pas
*/
- public static function param($p, $default = false) {
- return isset($_SESSION[$p]) ? $_SESSION[$p] : $default;
+ public static function param(string $p, $default = false) {
+ return $_SESSION[$p] ?? $default;
}