Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1486-1491 (lines=6) @@
1483
    if ($query_result === true) {
1484
1485
      // "INSERT" || "REPLACE"
1486
      if (preg_match('/^\s*?(?:INSERT|REPLACE)\s+/i', $sql)) {
1487
        $insert_id = (int)$this->insert_id();
1488
        $this->_debug->logQuery($sql, $query_duration, $insert_id);
1489
1490
        return $insert_id;
1491
      }
1492
1493
      // "UPDATE" || "DELETE"
1494
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
@@ 1494-1499 (lines=6) @@
1491
      }
1492
1493
      // "UPDATE" || "DELETE"
1494
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
1495
        $affected_rows = (int)$this->affected_rows();
1496
        $this->_debug->logQuery($sql, $query_duration, $affected_rows);
1497
1498
        return $affected_rows;
1499
      }
1500
1501
      // log the ? query
1502
      $this->_debug->logQuery($sql, $query_duration, 0);