From 0317683155a3966830f3972fde1562087f65cf94 Mon Sep 17 00:00:00 2001 From: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:36:21 +0200 Subject: 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 Co-authored-by: Alexandre Alapetite --- lib/Minz/Session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.3