protected function updatedConvertLiveSegment(BatchJob $dbBatchJob, kConvertLiveSegmentJobData $data) { switch ($dbBatchJob->getStatus()) { case BatchJob::BATCHJOB_STATUS_FINISHED: return kFlowHelper::handleConvertLiveSegmentFinished($dbBatchJob, $data); case BatchJob::BATCHJOB_STATUS_FAILED: case BatchJob::BATCHJOB_STATUS_FATAL: return kFlowHelper::handleConvertLiveSegmentFailed($dbBatchJob, $data); default: return $dbBatchJob; } }