Simplify SubjectTransformer

[MAILPOET-4935]
This commit is contained in:
David Remer
2023-03-27 13:55:17 +03:00
committed by Aschepikov
parent 68f09b6bd1
commit 8cf48d2707
6 changed files with 81 additions and 179 deletions

View File

@@ -59,7 +59,7 @@ class TriggerHandler {
/** @param Subject[] $subjects */
public function processTrigger(Trigger $trigger, array $subjects): void {
$subjects = $this->subjectTransformerHandler->provideAllSubjects($trigger, ...$subjects);
$subjects = $this->subjectTransformerHandler->getAllSubjects(...$subjects);
$automations = $this->automationStorage->getActiveAutomationsByTrigger($trigger);
foreach ($automations as $automation) {
$step = $automation->getTrigger($trigger->getKey());