8889841cplugins/mailpoet/lib/Automation/Engine/Validation/AutomationRules/AtLeastOneTriggerRule.php000064400000002257150514127250036154 0ustar00home/clixcotz/tcchp.clix.co.tz/wp-contenttriggerFound = false; } public function visitNode(Automation $automation, AutomationNode $node): void { if ($node->getStep()->getType() === Step::TYPE_TRIGGER) { $this->triggerFound = true; } } public function complete(Automation $automation): void { if (!$automation->needsFullValidation()) { return; } if ($this->triggerFound) { return; } throw Exceptions::automationStructureNotValid(__('There must be at least one trigger in the automation.', 'mailpoet'), self::RULE_ID); } }