Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1468-1473 (lines=6) @@
1465
    if ($query_result === true) {
1466
1467
      // "INSERT" || "REPLACE"
1468
      if (preg_match('/^\s*?(?:INSERT|REPLACE)\s+/i', $sql)) {
1469
        $insert_id = (int)$this->insert_id();
1470
        $this->_debug->logQuery($sql, $query_duration, $insert_id);
1471
1472
        return $insert_id;
1473
      }
1474
1475
      // "UPDATE" || "DELETE"
1476
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
@@ 1476-1481 (lines=6) @@
1473
      }
1474
1475
      // "UPDATE" || "DELETE"
1476
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
1477
        $affected_rows = (int)$this->affected_rows();
1478
        $this->_debug->logQuery($sql, $query_duration, $affected_rows);
1479
1480
        return $affected_rows;
1481
      }
1482
1483
      // log the ? query
1484
      $this->_debug->logQuery($sql, $query_duration, 0);