mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Big refactor to remove the deprecated transaction collector.
This commit is contained in:
@@ -178,7 +178,7 @@ class AccountController extends Controller
|
||||
$defaultSet = $this->repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray();
|
||||
$frontPage = app('preferences')->get('frontPageAccounts', $defaultSet);
|
||||
$default = app('amount')->getDefaultCurrency();
|
||||
if (0 === \count($frontPage->data)) {
|
||||
if (0 === count($frontPage->data)) {
|
||||
$frontPage->data = $defaultSet;
|
||||
$frontPage->save();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class PreferenceController extends Controller
|
||||
// an important fallback is that the frontPageAccount array gets refilled automatically
|
||||
// when it turns up empty.
|
||||
$frontPageAccounts = app('preferences')->getForUser($user, 'frontPageAccounts', [])->data;
|
||||
if (0 === \count($frontPageAccounts)) {
|
||||
if (0 === count($frontPageAccounts)) {
|
||||
/** @var Collection $accounts */
|
||||
$accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
|
||||
$accountIds = $accounts->pluck('id')->toArray();
|
||||
|
||||
@@ -141,7 +141,7 @@ class RuleRequest extends Request
|
||||
$data = $validator->getData();
|
||||
$actions = $data['actions'] ?? [];
|
||||
// need at least one trigger
|
||||
if (0 === \count($actions)) {
|
||||
if (0 === count($actions)) {
|
||||
$validator->errors()->add('title', (string)trans('validation.at_least_one_action'));
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ class RuleRequest extends Request
|
||||
$data = $validator->getData();
|
||||
$triggers = $data['triggers'] ?? [];
|
||||
// need at least one trugger
|
||||
if (0 === \count($triggers)) {
|
||||
if (0 === count($triggers)) {
|
||||
$validator->errors()->add('title', (string)trans('validation.at_least_one_trigger'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user