Reformat various code.

This commit is contained in:
James Cole
2022-03-29 14:58:06 +02:00
parent 1209c4e76a
commit 29bed2547c
140 changed files with 1004 additions and 1010 deletions

View File

@@ -63,7 +63,7 @@ class ShowController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', (string)trans('firefly.bills'));
app('view')->share('title', (string) trans('firefly.bills'));
app('view')->share('mainTitleIcon', 'fa-calendar-o');
$this->repository = app(BillRepositoryInterface::class);
@@ -84,7 +84,7 @@ class ShowController extends Controller
{
$total = 0;
if (false === $bill->active) {
$request->session()->flash('warning', (string)trans('firefly.cannot_scan_inactive_bill'));
$request->session()->flash('warning', (string) trans('firefly.cannot_scan_inactive_bill'));
return redirect(route('bills.show', [$bill->id]));
}
@@ -94,7 +94,7 @@ class ShowController extends Controller
$total = 0;
}
if (0 === $set->count()) {
$request->session()->flash('error', (string)trans('firefly.no_rules_for_bill'));
$request->session()->flash('error', (string) trans('firefly.no_rules_for_bill'));
return redirect(route('bills.show', [$bill->id]));
}
@@ -110,7 +110,7 @@ class ShowController extends Controller
// file the rule(s)
$ruleEngine->fire();
$request->session()->flash('success', (string)trans_choice('firefly.rescanned_bill', $total));
$request->session()->flash('success', (string) trans_choice('firefly.rescanned_bill', $total));
app('preferences')->mark();
return redirect(route('bills.show', [$bill->id]));
@@ -135,8 +135,8 @@ class ShowController extends Controller
/** @var Carbon $end */
$end = session('end');
$year = $start->year;
$page = (int)$request->get('page');
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
$page = (int) $request->get('page');
$pageSize = (int) app('preferences')->get('listPageSize', 50)->data;
$yearAverage = $this->repository->getYearAverage($bill, $start);
$overallAverage = $this->repository->getOverallAverage($bill);
$manager = new Manager();