Code Duplication    Length = 12-12 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1465-1476 (lines=12) @@
1462
   *
1463
   * @return bool <p>Boolean true on success, false otherwise.</p>
1464
   */
1465
  public function rollback()
1466
  {
1467
    if ($this->_in_transaction === false) {
1468
      return false;
1469
    }
1470
1471
    $return = \mysqli_rollback($this->link);
1472
    \mysqli_autocommit($this->link, true);
1473
    $this->_in_transaction = false;
1474
1475
    return $return;
1476
  }
1477
1478
1479
  /**
@@ 1484-1495 (lines=12) @@
1481
   *
1482
   * @return bool <p>Boolean true on success, false otherwise.</p>
1483
   */
1484
  public function commit()
1485
  {
1486
    if ($this->_in_transaction === false) {
1487
      return false;
1488
    }
1489
1490
    $return = mysqli_commit($this->link);
1491
    \mysqli_autocommit($this->link, true);
1492
    $this->_in_transaction = false;
1493
1494
    return $return;
1495
  }
1496
1497
  /**
1498
   * Try to secure a variable, so can you use it in sql-queries.