Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

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