Forgot the nullables!

This commit is contained in:
flash 2019-03-18 21:16:59 +01:00
parent 3684fc3b0c
commit 21275d68f9

View file

@ -93,12 +93,12 @@ class RequestVar
return empty($this->value) ? $default : (int)$this->value; 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; 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; return empty($this->value) ? $default : (float)$this->value;
} }