Code Duplication    Length = 13-13 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1530-1542 (lines=13) @@
1527
   *
1528
   * @return bool <p>Boolean true on success, false otherwise.</p>
1529
   */
1530
  public function rollback()
1531
  {
1532
    if ($this->_in_transaction === false) {
1533
      $this->_debug->displayError('Error: mysql server is not in transaction!', false);
1534
      return false;
1535
    }
1536
1537
    $return = \mysqli_rollback($this->link);
1538
    \mysqli_autocommit($this->link, true);
1539
    $this->_in_transaction = false;
1540
1541
    return $return;
1542
  }
1543
1544
1545
  /**
@@ 1550-1562 (lines=13) @@
1547
   *
1548
   * @return bool <p>Boolean true on success, false otherwise.</p>
1549
   */
1550
  public function commit()
1551
  {
1552
    if ($this->_in_transaction === false) {
1553
      $this->_debug->displayError('Error: mysql server is not in transaction!', false);
1554
      return false;
1555
    }
1556
1557
    $return = mysqli_commit($this->link);
1558
    \mysqli_autocommit($this->link, true);
1559
    $this->_in_transaction = false;
1560
1561
    return $return;
1562
  }
1563
1564
  /**
1565
   * Execute a callback inside a transaction.