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

@@ -51,7 +51,7 @@ class PreferencesController extends Controller
$this->middleware(
function ($request, $next) {
app('view')->share('title', (string)trans('firefly.preferences'));
app('view')->share('title', (string) trans('firefly.preferences'));
app('view')->share('mainTitleIcon', 'fa-gear');
return $next($request);
@@ -114,7 +114,7 @@ class PreferencesController extends Controller
Log::error($e->getMessage());
$locales = [];
}
$locales = ['equal' => (string)trans('firefly.equal_to_language')] + $locales;
$locales = ['equal' => (string) trans('firefly.equal_to_language')] + $locales;
// an important fallback is that the frontPageAccount array gets refilled automatically
// when it turns up empty.
if (empty($frontPageAccounts->data)) {
@@ -154,7 +154,7 @@ class PreferencesController extends Controller
$frontPageAccounts = [];
if (is_array($request->get('frontPageAccounts')) && count($request->get('frontPageAccounts')) > 0) {
foreach ($request->get('frontPageAccounts') as $id) {
$frontPageAccounts[] = (int)$id;
$frontPageAccounts[] = (int) $id;
}
app('preferences')->set('frontPageAccounts', $frontPageAccounts);
}
@@ -167,8 +167,8 @@ class PreferencesController extends Controller
session()->forget('range');
// custom fiscal year
$customFiscalYear = 1 === (int)$request->get('customFiscalYear');
$string = strtotime((string)$request->get('fiscalYearStart'));
$customFiscalYear = 1 === (int) $request->get('customFiscalYear');
$string = strtotime((string) $request->get('fiscalYearStart'));
if (false !== $string) {
$fiscalYearStart = date('m-d', $string);
app('preferences')->set('customFiscalYear', $customFiscalYear);
@@ -178,7 +178,7 @@ class PreferencesController extends Controller
// save page size:
app('preferences')->set('listPageSize', 50);
$listPageSize = (int)$request->get('listPageSize');
$listPageSize = (int) $request->get('listPageSize');
if ($listPageSize > 0 && $listPageSize < 1337) {
app('preferences')->set('listPageSize', $listPageSize);
}
@@ -220,7 +220,7 @@ class PreferencesController extends Controller
];
app('preferences')->set('transaction_journal_optional_fields', $optionalTj);
session()->flash('success', (string)trans('firefly.saved_preferences'));
session()->flash('success', (string) trans('firefly.saved_preferences'));
app('preferences')->mark();
return redirect(route('preferences.index'));