mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Reformat various code.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user