Code Duplication    Length = 7-7 lines in 3 locations

Ubiquity/db/export/DataExport.php 2 locations

@@ 44-50 (lines=7) @@
41
		return "INSERT INTO `".$table."` (".SqlUtils::getFieldList($fields).") VALUES ".$datas;
42
	}
43
44
	protected function batchRows($rows,$fields){
45
		$result=[];
46
		foreach ($rows as $row){
47
			$result[]="(".$this->batchOneRow($row,$fields).")";
48
		}
49
		return \implode(",", $result);
50
	}
51
52
	protected function batchOneRow($row,$fields){
53
		$result=[];
@@ 52-58 (lines=7) @@
49
		return \implode(",", $result);
50
	}
51
52
	protected function batchOneRow($row,$fields){
53
		$result=[];
54
		foreach ($fields as $field){
55
			$result[]="'".$row->_rest[$field]."'";
56
		}
57
		return \implode(",", $result);
58
	}
59
}

Ubiquity/db/export/SqlExport.php 1 location

@@ 18-24 (lines=7) @@
15
		return $this->generateInsert($tableName, $fields, $datas);
16
	}
17
18
	protected function batchOneRow($row,$fields){
19
		$result=[];
20
		foreach ($fields as $field){
21
			$result[]="'".$row[$field]."'";
22
		}
23
		return \implode(",", $result);
24
	}
25
}