mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 09:51:21 -06:00
Removed code left over from merge
This commit is contained in:
parent
2eb7d8ba91
commit
3a33ac1455
@ -17,7 +17,6 @@ use FireflyIII\Models\TransactionJournal;
|
|||||||
use FireflyIII\Rules\Actions\ActionInterface;
|
use FireflyIII\Rules\Actions\ActionInterface;
|
||||||
use FireflyIII\Rules\Triggers\TriggerInterface;
|
use FireflyIII\Rules\Triggers\TriggerInterface;
|
||||||
use FireflyIII\Rules\Triggers\TriggerFactory;
|
use FireflyIII\Rules\Triggers\TriggerFactory;
|
||||||
use FireflyIII\Support\Domain;
|
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,10 +30,6 @@ class Processor
|
|||||||
protected $journal;
|
protected $journal;
|
||||||
/** @var Rule */
|
/** @var Rule */
|
||||||
protected $rule;
|
protected $rule;
|
||||||
/** @var array */
|
|
||||||
private $actionTypes = [];
|
|
||||||
/** @var array */
|
|
||||||
private $triggerTypes = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processor constructor.
|
* Processor constructor.
|
||||||
@ -46,8 +41,6 @@ class Processor
|
|||||||
{
|
{
|
||||||
$this->rule = $rule;
|
$this->rule = $rule;
|
||||||
$this->journal = $journal;
|
$this->journal = $journal;
|
||||||
$this->triggerTypes = Domain::getRuleTriggers();
|
|
||||||
$this->actionTypes = Domain::getRuleActions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,12 +112,6 @@ class Processor
|
|||||||
* @var RuleAction $action
|
* @var RuleAction $action
|
||||||
*/
|
*/
|
||||||
foreach ($this->rule->ruleActions()->orderBy('order', 'ASC')->get() as $action) {
|
foreach ($this->rule->ruleActions()->orderBy('order', 'ASC')->get() as $action) {
|
||||||
$type = $action->action_type;
|
|
||||||
$class = $this->actionTypes[$type];
|
|
||||||
Log::debug('Action #' . $action->id . ' for rule #' . $action->rule_id . ' (' . $type . ')');
|
|
||||||
if (!class_exists($class)) {
|
|
||||||
abort(500, 'Could not instantiate class for rule action type "' . $type . '" (' . $class . ').');
|
|
||||||
}
|
|
||||||
/** @var ActionInterface $actionClass */
|
/** @var ActionInterface $actionClass */
|
||||||
$actionClass = ActionFactory::getAction($action, $this->journal);
|
$actionClass = ActionFactory::getAction($action, $this->journal);
|
||||||
$actionClass->act();
|
$actionClass->act();
|
||||||
|
Loading…
Reference in New Issue
Block a user