From d2f14471f746f92a0884a02748a841e96f5dd443 Mon Sep 17 00:00:00 2001 From: mambax7 Date: Mon, 30 Oct 2023 11:55:03 -0400 Subject: [PATCH] PSR-12 --- src/Request.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Request.php b/src/Request.php index 08a9901..d7888c2 100644 --- a/src/Request.php +++ b/src/Request.php @@ -122,13 +122,12 @@ public static function getVar($name, $default = null, $hash = 'default', $type = ) { $var = static::stripSlashesRecursive($var); } + } elseif ($default !== null) { + // Clean the default value + $var = static::cleanVar($default, $mask, $type); } else { - if ($default !== null) { - // Clean the default value - $var = static::cleanVar($default, $mask, $type); - } else { - $var = $default; - } + $var = $default; + } return $var;