Code Duplication    Length = 5-5 lines in 2 locations

modules/com_vtiger_workflow/Workflow.php 1 location

@@ 167-171 (lines=5) @@
164
		foreach ($tasks as &$task) {
165
			if ($task->active) {
166
				$trigger = $task->trigger;
167
				if ($trigger !== null) {
168
					$delay = strtotime($recordModel->get($trigger['field'])) + $trigger['days'] * 86400;
169
				} else {
170
					$delay = 0;
171
				}
172
				if ($task->executeImmediately === true) {
173
					$task->doTask($recordModel);
174
				} else {

modules/com_vtiger_workflow/WorkFlowScheduler.php 1 location

@@ 105-109 (lines=5) @@
102
					foreach ($tasks as $task) {
103
						if ($task->active) {
104
							$trigger = $task->trigger;
105
							if ($trigger !== null) {
106
								$delay = strtotime($data[$trigger['field']]) + $trigger['days'] * 86400;
107
							} else {
108
								$delay = 0;
109
							}
110
							if ($task->executeImmediately === true) {
111
								$task->doTask($recordModel);
112
							} else {