public function log($history, $line, array $errors) { if ($this->findHistoryById($history)) { $log = $this->getNewImportLogRecord(); $log->historyId = $history; $log->line = $line + 2; $log->errors = $errors; $log->save(false); } return $errors; }