src/Connection.php
public function commit()
    {
        // check if transaction is actually started
        if (!$this->inTransaction()) {
            throw new Exception('Using commit() when no transaction has started');
        }

        $this->transaction_depth--;

        if ($this->transaction_depth == 0) {
            return $this->connection->commit();
        }

        return false;
    }
public function commit()
    {
        // check if transaction is actually started
        if (!$this->inTransaction()) {
            throw new Exception('Using commit() when no transaction has started');
        }

        $this->transaction_depth--;

        if ($this->transaction_depth == 0) {
            return $this->connection->commit();
        }

        return false;
    }
Commits transaction.

Each occurrence of beginTransaction() must be matched with commit().
Only when same amount of commits are executed, the actual commit will be
issued to the database.

@see beginTransaction()

@return mixed Don't rely on any meaningful return