public function rollback()
    {
        if (count($this->transactions) <= 1) {
            throw new UnbegunTransaction('Attempted to rollback without having begun a transaction.');
        }

        /** @var Transaction $transaction */
        $transaction = array_pop($this->transactions);

        return $transaction->rollback();
    }