Various code cleanup.

This commit is contained in:
James Cole
2017-12-22 18:32:43 +01:00
parent f13a93348f
commit 8bd76d1ff0
188 changed files with 383 additions and 396 deletions

View File

@@ -85,7 +85,7 @@ class BudgetController extends Controller
$start = Carbon::createFromFormat('Y-m-d', $request->get('start'));
$end = Carbon::createFromFormat('Y-m-d', $request->get('end'));
$budgetLimit = $this->repository->updateLimitAmount($budget, $start, $end, $amount);
if (bccomp($amount, '0') === 0) {
if (0 === bccomp($amount, '0')) {
$budgetLimit = null;
}
@@ -302,7 +302,7 @@ class BudgetController extends Controller
$currentStart = app('navigation')->addPeriod($currentStart, $range, 0);
++$count;
}
if ($count === 0) {
if (0 === $count) {
$count = 1; // @codeCoverageIgnore
}
$result['available'] = bcdiv($total, strval($count));