Code Duplication    Length = 6-6 lines in 2 locations

src/voku/db/DB.php 2 locations

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