Code cleanup.

This commit is contained in:
James Cole
2018-04-02 14:17:11 +02:00
parent 4cea5d65a6
commit f96f38b172
44 changed files with 87 additions and 100 deletions

View File

@@ -108,8 +108,8 @@ class BillRequest extends Request
$validator->after(
function (Validator $validator) {
$data = $validator->getData();
$min = floatval($data['amount_min'] ?? 0);
$max = floatval($data['amount_max'] ?? 0);
$min = (float)($data['amount_min'] ?? 0);
$max = (float)($data['amount_max'] ?? 0);
if ($min > $max) {
$validator->errors()->add('amount_min', trans('validation.amount_min_over_max'));
}