mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -87,7 +87,7 @@ class ReportController extends Controller
|
||||
$budget = $budgetRepository->find(intval($attributes['budgetId']));
|
||||
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$account = $accountRepository->find(intval($attributes['accountId']));
|
||||
|
||||
switch (true) {
|
||||
@@ -177,7 +177,7 @@ class ReportController extends Controller
|
||||
private function expenseEntry(array $attributes): string
|
||||
{
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$account = $repository->find(intval($attributes['accountId']));
|
||||
$journals = $repository->getExpensesByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||
$view = view('popup.report.expense-entry', compact('journals', 'account'))->render();
|
||||
@@ -196,7 +196,7 @@ class ReportController extends Controller
|
||||
private function incomeEntry(array $attributes): string
|
||||
{
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$account = $repository->find(intval($attributes['accountId']));
|
||||
$journals = $repository->getIncomeByDestination($account, $attributes['accounts'], $attributes['startDate'], $attributes['endDate']);
|
||||
$view = view('popup.report.income-entry', compact('journals', 'account'))->render();
|
||||
|
@@ -147,7 +147,7 @@ class ReportController extends Controller
|
||||
private function auditReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||
{
|
||||
/** @var ARI $repos */
|
||||
$repos = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$repos = app(ARI::class);
|
||||
$auditData = [];
|
||||
$dayBefore = clone $start;
|
||||
$dayBefore->subDay();
|
||||
|
@@ -289,7 +289,7 @@ class TransactionController extends Controller
|
||||
{
|
||||
$subTitle = trans('firefly.mass_edit_journals');
|
||||
/** @var ARI $accountRepository */
|
||||
$accountRepository = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');
|
||||
$accountRepository = app(ARI::class);
|
||||
$accountList = ExpandedForm::makeSelectList($accountRepository->getAccounts(['Default account', 'Asset account']));
|
||||
|
||||
// put previous url in session
|
||||
|
Reference in New Issue
Block a user