mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Code clean up.
This commit is contained in:
@@ -132,7 +132,7 @@ class ReconcileController extends Controller
|
||||
return view(
|
||||
'accounts.reconcile.index',
|
||||
compact(
|
||||
'account',
|
||||
'account',
|
||||
'currency',
|
||||
'subTitleIcon',
|
||||
'start',
|
||||
@@ -141,11 +141,11 @@ class ReconcileController extends Controller
|
||||
'startBalance',
|
||||
'endBalance',
|
||||
'transactionsUri',
|
||||
'selectionStart',
|
||||
'selectionStart',
|
||||
'selectionEnd',
|
||||
'overviewUri',
|
||||
'indexUri'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ class AccountController extends Controller
|
||||
return view(
|
||||
'accounts.edit',
|
||||
compact(
|
||||
'allCurrencies',
|
||||
'allCurrencies',
|
||||
'currencySelectList',
|
||||
'account',
|
||||
'currency',
|
||||
@@ -218,7 +218,7 @@ class AccountController extends Controller
|
||||
'what',
|
||||
'roles',
|
||||
'preFilled'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,14 +85,18 @@ class LoginController extends Controller
|
||||
$hasTable = Schema::hasTable('users');
|
||||
|
||||
if (!$hasTable) {
|
||||
$message = 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
|
||||
$message
|
||||
= 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
|
||||
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
// check for presence of currency:
|
||||
$currency = TransactionCurrency::where('code', 'EUR')->first();
|
||||
if (is_null($currency)) {
|
||||
$message = 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
|
||||
$message
|
||||
= 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
|
||||
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
|
||||
@@ -160,9 +160,9 @@ class RegisterController extends Controller
|
||||
return Validator::make(
|
||||
$data,
|
||||
[
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|secure_password|confirmed',
|
||||
]
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|secure_password|confirmed',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,10 +455,10 @@ class BudgetController extends Controller
|
||||
$subTitle = trans(
|
||||
'firefly.budget_in_period',
|
||||
[
|
||||
'name' => $budget->name,
|
||||
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
|
||||
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
|
||||
]
|
||||
'name' => $budget->name,
|
||||
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
|
||||
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
|
||||
]
|
||||
);
|
||||
|
||||
// collector:
|
||||
|
||||
@@ -123,7 +123,7 @@ class HomeController extends Controller
|
||||
return view(
|
||||
'debug',
|
||||
compact(
|
||||
'phpVersion',
|
||||
'phpVersion',
|
||||
'extensions',
|
||||
'carbon',
|
||||
'now',
|
||||
@@ -136,7 +136,7 @@ class HomeController extends Controller
|
||||
'isDocker',
|
||||
'isSandstorm',
|
||||
'trustedProxies'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -291,11 +291,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'success',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.added_amount_to_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.added_amount_to_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
Preferences::mark();
|
||||
|
||||
@@ -306,11 +306,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'error',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.cannot_add_amount_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.cannot_add_amount_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return redirect(route('piggy-banks.index'));
|
||||
@@ -348,11 +348,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'error',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.cannot_remove_from_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.cannot_remove_from_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return redirect(route('piggy-banks.index'));
|
||||
|
||||
@@ -90,12 +90,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_audit',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_audit',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -126,12 +126,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_budget',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_budget',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Budget', $start, $end);
|
||||
@@ -162,12 +162,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_category',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_category',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Category', $start, $end);
|
||||
@@ -198,12 +198,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Standard', $start, $end);
|
||||
@@ -344,12 +344,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_tag',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_tag',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Tag', $start, $end);
|
||||
|
||||
@@ -213,15 +213,15 @@ class RuleController extends Controller
|
||||
return view(
|
||||
'rules.rule.edit',
|
||||
compact(
|
||||
'rule',
|
||||
'rule',
|
||||
'subTitle',
|
||||
'primaryTrigger',
|
||||
'primaryTrigger',
|
||||
'oldTriggers',
|
||||
'oldActions',
|
||||
'triggerCount',
|
||||
'actionCount',
|
||||
'ruleGroups'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user