/** * Start the process. * * @param JobReport $report */ public function run(JobReport $report) { $this->report = $report; $report->setStartTime(microtime(true)); $this->getProcess()->start(function ($type, $buffer) use($report) { if (Process::ERR === $type) { $report->addError($buffer); } else { $report->addOutput($buffer); } }); }