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

@@ -58,7 +58,7 @@ class SelectController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', (string)trans('firefly.rules'));
app('view')->share('title', (string) trans('firefly.rules'));
app('view')->share('mainTitleIcon', 'fa-random');
return $next($request);
@@ -97,7 +97,7 @@ class SelectController extends Controller
$newRuleEngine->fire();
$resultCount = $newRuleEngine->getResults();
session()->flash('success', (string)trans_choice('firefly.applied_rule_selection', $resultCount, ['title' => $rule->title]));
session()->flash('success', (string) trans_choice('firefly.applied_rule_selection', $resultCount, ['title' => $rule->title]));
return redirect()->route('rules.index');
}
@@ -119,7 +119,7 @@ class SelectController extends Controller
// does the user have shared accounts?
$first = session('first', Carbon::now()->subYear())->format('Y-m-d');
$today = Carbon::now()->format('Y-m-d');
$subTitle = (string)trans('firefly.apply_rule_selection', ['title' => $rule->title]);
$subTitle = (string) trans('firefly.apply_rule_selection', ['title' => $rule->title]);
return view('rules.rule.select-transactions', compact('first', 'today', 'rule', 'subTitle'));
}
@@ -145,7 +145,7 @@ class SelectController extends Controller
// warn if nothing.
if (empty($textTriggers)) {
return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]);
return response()->json(['html' => '', 'warning' => (string) trans('firefly.warning_no_valid_triggers')]);
}
foreach ($textTriggers as $textTrigger) {
@@ -169,7 +169,7 @@ class SelectController extends Controller
// Warn the user if only a subset of transactions is returned
$warning = '';
if (empty($collection)) {
$warning = (string)trans('firefly.warning_no_matching_transactions');
$warning = (string) trans('firefly.warning_no_matching_transactions');
}
// Return json response
@@ -200,7 +200,7 @@ class SelectController extends Controller
$triggers = $rule->ruleTriggers;
if (empty($triggers)) {
return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]);
return response()->json(['html' => '', 'warning' => (string) trans('firefly.warning_no_valid_triggers')]);
}
// create new rule engine:
$newRuleEngine = app(RuleEngineInterface::class);
@@ -212,7 +212,7 @@ class SelectController extends Controller
$warning = '';
if (empty($collection)) {
$warning = (string)trans('firefly.warning_no_matching_transactions');
$warning = (string) trans('firefly.warning_no_matching_transactions');
}
// Return json response