Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1366-1371 (lines=6) @@
1363
    if ($query_result === true) {
1364
1365
      // "INSERT" || "REPLACE"
1366
      if (preg_match('/^\s*?(?:INSERT|REPLACE)\s+/i', $sql)) {
1367
        $insert_id = (int)$this->insert_id();
1368
        $this->_debug->logQuery($sql, $query_duration, $insert_id);
1369
1370
        return $insert_id;
1371
      }
1372
1373
      // "UPDATE" || "DELETE"
1374
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
@@ 1374-1379 (lines=6) @@
1371
      }
1372
1373
      // "UPDATE" || "DELETE"
1374
      if (preg_match('/^\s*?(?:UPDATE|DELETE)\s+/i', $sql)) {
1375
        $affected_rows = (int)$this->affected_rows();
1376
        $this->_debug->logQuery($sql, $query_duration, $affected_rows);
1377
1378
        return $affected_rows;
1379
      }
1380
1381
      // log the ? query
1382
      $this->_debug->logQuery($sql, $query_duration, 0);