Code Duplication    Length = 10-11 lines in 2 locations

class/adodb.php 1 location

@@ 1108-1118 (lines=11) @@
1105
			// Do prepare
1106
			$stmt = $this->Prepare($sql);
1107
			// Execute
1108
			if ('U' == $mode) {
1109
				foreach ($data as &$row) {
1110
					// Change pk's value position when update mode
1111
					foreach ($pk as $key) {
1112
						$v = $row[$key];
1113
						unset($row[$key]);
1114
						$row[$key] = $v;
1115
					}
1116
				}
1117
				unset($row);
1118
			}
1119
			// Now, finanly, actual write data
1120
			// Auto convert encoding ?
1121
			// Use of prepare we must convert $data manually, because $data is not sql.

src/Fwlib/Bridge/Adodb.php 1 location

@@ 1520-1529 (lines=10) @@
1517
        // @codeCoverageIgnoreEnd
1518
1519
        // Change PK position in data array
1520
        if ('U' == $mode) {
1521
            foreach ($data as &$row) {
1522
                foreach ($arPk as $key) {
1523
                    $v = $row[$key];
1524
                    unset($row[$key]);
1525
                    $row[$key] = $v;
1526
                }
1527
            }
1528
            unset($row);
1529
        }
1530
1531
        // Convert data encoding
1532
        $this->convertEncodingSql($data);