original_string: private function commit()
      {
          if ($this->inTransaction) {
              try {
                  // commit read-write transaction which also releases the lock
                  if ('sqlite' === $this->driver) {
                      $this->pdo->exec('COMMIT');
                  } else {
                      $this->pdo->commit();
                  }
                  $this->inTransaction = false;
              } catch (\PDOException $e) {
                  $this->rollback();
  
                  throw $e;
              }
          }
      }
code: private function commit()
      {
          if ($this->inTransaction) {
              try {
                  // commit read-write transaction which also releases the lock
                  if ('sqlite' === $this->driver) {
                      $this->pdo->exec('COMMIT');
                  } else {
                      $this->pdo->commit();
                  }
                  $this->inTransaction = false;
              } catch (\PDOException $e) {
                  $this->rollback();
  
                  throw $e;
              }
          }
      }
code_tokens: private function commit ( ) { if ( $ this -> inTransaction ) { try { // commit read-write transaction which also releases the lock if ( 'sqlite' === $ this -> driver ) { $ this -> pdo -> exec ( 'COMMIT' ) ; } else { $ this -> pdo -> commit ( ) ; } $ this -> inTransaction = false ; } catch ( \ PDOException $ e ) { $ this -> rollback ( ) ; throw $ e ; } } }
docstring: Helper method to commit a transaction.
docstring_tokens: Helper method to commit a transaction .