needsFullValidation()) { return; } $step = $node->getStep(); if ($step->getType() !== Step::TYPE_TRIGGER) { return; } $nextStepIds = $step->getNextStepIds(); if (!count($nextStepIds)) { throw Exceptions::automationStructureNotValid(__('A trigger needs to be followed by an action.', 'mailpoet'), self::RULE_ID); } foreach ($nextStepIds as $nextStepsId) { $step = $automation->getStep($nextStepsId); if ($step && $step->getType() === Step::TYPE_ACTION) { continue; } throw Exceptions::automationStructureNotValid(__('A trigger needs to be followed by an action.', 'mailpoet'), self::RULE_ID); } } public function complete(Automation $automation): void { } }