mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Big refactor to remove the deprecated transaction collector.
This commit is contained in:
@@ -88,8 +88,8 @@ class CreateController extends Controller
|
||||
$oldActions = $this->getPreviousActions($request);
|
||||
}
|
||||
|
||||
$triggerCount = \count($oldTriggers);
|
||||
$actionCount = \count($oldActions);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$actionCount = count($oldActions);
|
||||
$subTitleIcon = 'fa-clone';
|
||||
|
||||
// title depends on whether or not there is a rule group:
|
||||
@@ -140,8 +140,8 @@ class CreateController extends Controller
|
||||
$oldTriggers = $this->getTriggersForBill($bill);
|
||||
$oldActions = $this->getActionsForBill($bill);
|
||||
|
||||
$triggerCount = \count($oldTriggers);
|
||||
$actionCount = \count($oldActions);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$actionCount = count($oldActions);
|
||||
$subTitleIcon = 'fa-clone';
|
||||
|
||||
// title depends on whether or not there is a rule group:
|
||||
|
||||
@@ -79,19 +79,19 @@ class EditController extends Controller
|
||||
$oldActions = [];
|
||||
$oldTriggers = [];
|
||||
// has old input?
|
||||
if (\count($request->old()) > 0) {
|
||||
if (count($request->old()) > 0) {
|
||||
$oldTriggers = $this->getPreviousTriggers($request);
|
||||
$triggerCount = \count($oldTriggers);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$oldActions = $this->getPreviousActions($request);
|
||||
$actionCount = \count($oldActions);
|
||||
$actionCount = count($oldActions);
|
||||
}
|
||||
|
||||
// overrule old input when it has no rule data:
|
||||
if (0 === $triggerCount && 0 === $actionCount) {
|
||||
$oldTriggers = $this->getCurrentTriggers($rule);
|
||||
$triggerCount = \count($oldTriggers);
|
||||
$triggerCount = count($oldTriggers);
|
||||
$oldActions = $this->getCurrentActions($rule);
|
||||
$actionCount = \count($oldActions);
|
||||
$actionCount = count($oldActions);
|
||||
}
|
||||
|
||||
$hasOldInput = null !== $request->old('_token');
|
||||
|
||||
@@ -145,7 +145,7 @@ class SelectController extends Controller
|
||||
// build trigger array from response
|
||||
$triggers = $this->getValidTriggerList($request);
|
||||
|
||||
if (0 === \count($triggers)) {
|
||||
if (0 === count($triggers)) {
|
||||
return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ class SelectController extends Controller
|
||||
{
|
||||
$triggers = $rule->ruleTriggers;
|
||||
|
||||
if (0 === \count($triggers)) {
|
||||
if (0 === count($triggers)) {
|
||||
return response()->json(['html' => '', 'warning' => (string)trans('firefly.warning_no_valid_triggers')]); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user