/**
* @param string $job
* @param array $config
* @param Helper $helper
*/
public function __construct($job, array $config, Helper $helper = null)
{
$this->job = $job;
$this->config = $config + ['recipients' => null, 'mailer' => null, 'maxRuntime' => null, 'smtpHost' => null, 'smtpPort' => null, 'smtpUsername' => null, 'smtpPassword' => null, 'smtpSender' => null, 'smtpSenderName' => null, 'smtpSecurity' => null, 'runAs' => null, 'environment' => null, 'runOnHost' => null, 'output' => null, 'dateFormat' => null, 'enabled' => null, 'haltDir' => null, 'debug' => null];
$this->helper = $helper ?: new Helper();
$this->tmpDir = $this->helper->getTempDir();
}