mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Big refactor to remove the deprecated transaction collector.
This commit is contained in:
@@ -222,7 +222,7 @@ class ApplyRules extends Command
|
||||
$finalList = new Collection;
|
||||
$accountList = explode(',', $accountString);
|
||||
|
||||
if (0 === \count($accountList)) {
|
||||
if (0 === count($accountList)) {
|
||||
$this->error('Please use the --accounts to indicate the accounts to apply rules to.');
|
||||
|
||||
return false;
|
||||
@@ -267,7 +267,7 @@ class ApplyRules extends Command
|
||||
}
|
||||
$ruleGroupList = explode(',', $ruleGroupString);
|
||||
|
||||
if (0 === \count($ruleGroupList)) {
|
||||
if (0 === count($ruleGroupList)) {
|
||||
// can be empty.
|
||||
|
||||
return true;
|
||||
@@ -299,7 +299,7 @@ class ApplyRules extends Command
|
||||
$finalList = new Collection;
|
||||
$ruleList = explode(',', $ruleString);
|
||||
|
||||
if (0 === \count($ruleList)) {
|
||||
if (0 === count($ruleList)) {
|
||||
// can be empty.
|
||||
|
||||
return true;
|
||||
|
@@ -225,8 +225,8 @@ class CreateImport extends Command
|
||||
if (null === $importJob->tag) {
|
||||
$this->errorLine('No transactions have been imported :(.');
|
||||
}
|
||||
if (\count($importJob->errors) > 0) {
|
||||
$this->infoLine(sprintf('%d error(s) occurred:', \count($importJob->errors)));
|
||||
if (count($importJob->errors) > 0) {
|
||||
$this->infoLine(sprintf('%d error(s) occurred:', count($importJob->errors)));
|
||||
foreach ($importJob->errors as $err) {
|
||||
$this->errorLine('- ' . $err);
|
||||
}
|
||||
|
@@ -99,7 +99,7 @@ class MigrateToRules extends Command
|
||||
|
||||
if (null === $ruleGroup) {
|
||||
$array = RuleGroup::get(['order'])->pluck('order')->toArray();
|
||||
$order = \count($array) > 0 ? max($array) + 1 : 1;
|
||||
$order = count($array) > 0 ? max($array) + 1 : 1;
|
||||
$ruleGroup = RuleGroup::create(
|
||||
[
|
||||
'user_id' => $user->id,
|
||||
|
Reference in New Issue
Block a user