8889841cwp-content/plugins/mailpoet/lib/Automation/Engine/Validation/AutomationRules/NoJoinRule.php000064400000002242150516176100034017 0ustar00home/clixcotz/tcchp.clix.co.tz */ private $visitedSteps = []; public function initialize(Automation $automation): void { $this->visitedSteps = []; } public function visitNode(Automation $automation, AutomationNode $node): void { $step = $node->getStep(); $this->visitedSteps[$step->getId()] = $step; foreach ($step->getNextSteps() as $nextStep) { $nextStepId = $nextStep->getId(); if (isset($this->visitedSteps[$nextStepId])) { throw Exceptions::automationStructureNotValid(__('Path join found in automation graph', 'mailpoet'), self::RULE_ID); } } } public function complete(Automation $automation): void { } }