mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 16:10:00 +00:00
Various bugfixes and code clean up.
This commit is contained in:
@@ -56,11 +56,15 @@ class Request extends FormRequest
|
||||
*
|
||||
* @param string $field
|
||||
*
|
||||
* @return float
|
||||
* @return float|null
|
||||
*/
|
||||
public function float(string $field): float
|
||||
public function float(string $field): ?float
|
||||
{
|
||||
return (float)$this->get($field);
|
||||
$res = $this->get($field);
|
||||
if(null === $res) {
|
||||
return null;
|
||||
}
|
||||
return (float)$res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user