Code Duplication    Length = 13-13 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 613-625 (lines=13) @@
610
   *
611
   * @return bool <p>Boolean true on success, false otherwise.</p>
612
   */
613
  public function commit(): bool
614
  {
615
    if ($this->_in_transaction === false) {
616
      $this->_debug->displayError('Error: mysql server is not in transaction!', false);
617
618
      return false;
619
    }
620
621
    $return = mysqli_commit($this->link);
622
    \mysqli_autocommit($this->link, true);
623
    $this->_in_transaction = false;
624
625
    return $return;
626
  }
627
628
  /**
@@ 1663-1675 (lines=13) @@
1660
   *
1661
   * @return bool <p>Boolean true on success, false otherwise.</p>
1662
   */
1663
  public function rollback(): bool
1664
  {
1665
    if ($this->_in_transaction === false) {
1666
      $this->_debug->displayError('Error: mysql server is not in transaction!', false);
1667
1668
      return false;
1669
    }
1670
1671
    $return = \mysqli_rollback($this->link);
1672
    \mysqli_autocommit($this->link, true);
1673
    $this->_in_transaction = false;
1674
1675
    return $return;
1676
  }
1677
1678
  /**