Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1388-1393 (lines=6) @@
1385
    if ($query_result === true) {
1386
1387
      // "INSERT" || "REPLACE"
1388
      if (preg_match('/^\s*?(?:INSERT|REPLACE)\s+/i', $sql)) {
1389
        $insert_id = (int)$this->insert_id();
1390
        $this->_debug->logQuery($sql, $query_duration, $insert_id);
1391
1392
        return $insert_id;
1393
      }
1394
1395
      // "UPDATE" || "DELETE"
1396
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
@@ 1396-1401 (lines=6) @@
1393
      }
1394
1395
      // "UPDATE" || "DELETE"
1396
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
1397
        $affected_rows = (int)$this->affected_rows();
1398
        $this->_debug->logQuery($sql, $query_duration, $affected_rows);
1399
1400
        return $affected_rows;
1401
      }
1402
1403
      // log the ? query
1404
      $this->_debug->logQuery($sql, $query_duration, 0);