From 21275d68f976709a5e3959434f903ba03e3be7e9 Mon Sep 17 00:00:00 2001 From: flashwave Date: Mon, 18 Mar 2019 21:16:59 +0100 Subject: [PATCH] Forgot the nullables! --- src/Request/RequestVar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Request/RequestVar.php b/src/Request/RequestVar.php index 9897261a..09bd7497 100644 --- a/src/Request/RequestVar.php +++ b/src/Request/RequestVar.php @@ -93,12 +93,12 @@ class RequestVar return empty($this->value) ? $default : (int)$this->value; } - public function bool(?bool $default = null): bool + public function bool(?bool $default = null): ?bool { return empty($this->value) ? $default : (bool)$this->value; } - public function float(?float $default = null): float + public function float(?float $default = null): ?float { return empty($this->value) ? $default : (float)$this->value; }