Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1494-1499 (lines=6) @@
1491
    if ($query_result === true) {
1492
1493
      // "INSERT" || "REPLACE"
1494
      if (preg_match('/^\s*?(?:INSERT|REPLACE)\s+/i', $sql)) {
1495
        $insert_id = (int)$this->insert_id();
1496
        $this->_debug->logQuery($sql, $query_duration, $insert_id);
1497
1498
        return $insert_id;
1499
      }
1500
1501
      // "UPDATE" || "DELETE"
1502
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
@@ 1502-1507 (lines=6) @@
1499
      }
1500
1501
      // "UPDATE" || "DELETE"
1502
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
1503
        $affected_rows = $this->affected_rows();
1504
        $this->_debug->logQuery($sql, $query_duration, $affected_rows);
1505
1506
        return $affected_rows;
1507
      }
1508
1509
      // log the ? query
1510
      $this->_debug->logQuery($sql, $query_duration, 0);