mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Remove static references
This commit is contained in:
@@ -138,7 +138,7 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function index(Request $request, string $objectType)
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
app('log')->debug(sprintf('Now at %s', __METHOD__));
|
||||
$subTitle = (string)trans(sprintf('firefly.%s_accounts', $objectType));
|
||||
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType));
|
||||
$types = config(sprintf('firefly.accountTypesByIdentifier.%s', $objectType));
|
||||
@@ -152,7 +152,7 @@ class IndexController extends Controller
|
||||
$accounts = $collection->slice(($page - 1) * $pageSize, $pageSize);
|
||||
$inactiveCount = $this->repository->getInactiveAccountsByType($types)->count();
|
||||
|
||||
Log::debug(sprintf('Count of collection: %d, count of accounts: %d', $total, $accounts->count()));
|
||||
app('log')->debug(sprintf('Count of collection: %d, count of accounts: %d', $total, $accounts->count()));
|
||||
|
||||
unset($collection);
|
||||
/** @var Carbon $start */
|
||||
@@ -189,13 +189,13 @@ class IndexController extends Controller
|
||||
}
|
||||
);
|
||||
// make paginator:
|
||||
Log::debug(sprintf('Count of accounts before LAP: %d', $accounts->count()));
|
||||
app('log')->debug(sprintf('Count of accounts before LAP: %d', $accounts->count()));
|
||||
/** @var LengthAwarePaginator $accounts */
|
||||
$accounts = new LengthAwarePaginator($accounts, $total, $pageSize, $page);
|
||||
$accounts->setPath(route('accounts.index', [$objectType]));
|
||||
|
||||
Log::debug(sprintf('Count of accounts after LAP (1): %d', $accounts->count()));
|
||||
Log::debug(sprintf('Count of accounts after LAP (2): %d', $accounts->getCollection()->count()));
|
||||
app('log')->debug(sprintf('Count of accounts after LAP (1): %d', $accounts->count()));
|
||||
app('log')->debug(sprintf('Count of accounts after LAP (2): %d', $accounts->getCollection()->count()));
|
||||
|
||||
return view('accounts.index', compact('objectType', 'inactiveCount', 'subTitleIcon', 'subTitle', 'page', 'accounts'));
|
||||
}
|
||||
|
||||
@@ -169,14 +169,14 @@ class ReconcileController extends Controller
|
||||
return $this->redirectAccountToAccount($account);
|
||||
}
|
||||
|
||||
Log::debug('In ReconcileController::submit()');
|
||||
app('log')->debug('In ReconcileController::submit()');
|
||||
$data = $request->getAll();
|
||||
|
||||
/** @var string $journalId */
|
||||
foreach ($data['journals'] as $journalId) {
|
||||
$this->repository->reconcileById((int)$journalId);
|
||||
}
|
||||
Log::debug('Reconciled all transactions.');
|
||||
app('log')->debug('Reconciled all transactions.');
|
||||
|
||||
// switch dates if necessary
|
||||
if ($end->lt($start)) {
|
||||
@@ -188,7 +188,7 @@ class ReconcileController extends Controller
|
||||
if ('create' === $data['reconcile']) {
|
||||
$result = $this->createReconciliation($account, $start, $end, $data['difference']);
|
||||
}
|
||||
Log::debug('End of routine.');
|
||||
app('log')->debug('End of routine.');
|
||||
app('preferences')->mark();
|
||||
if ('' === $result) {
|
||||
session()->flash('success', (string)trans('firefly.reconciliation_stored'));
|
||||
|
||||
Reference in New Issue
Block a user