def handle_end_block(self, token_text):
    while (self.flags.mode == MODE.Statement):
        self.restore_mode()
    empty_braces = (self.last_type == 'TK_START_BLOCK')
    if (self.opts.brace_style == 'expand'):
        if (not empty_braces):
            self.append_newline()
    elif (not empty_braces):
        if (self.is_array(self.flags.mode) and self.opts.keep_array_indentation):
            self.opts.keep_array_indentation = False
            self.append_newline()
            self.opts.keep_array_indentation = True
        else:
            self.append_newline()
    self.restore_mode()
    self.append_token(token_text)
def handle_end_block(self, token_text):
    while (self.flags.mode == MODE.Statement):
        self.restore_mode()
    empty_braces = (self.last_type == 'TK_START_BLOCK')
    if (self.opts.brace_style == 'expand'):
        if (not empty_braces):
            self.append_newline()
    elif (not empty_braces):
        if (self.is_array(self.flags.mode) and self.opts.keep_array_indentation):
            self.opts.keep_array_indentation = False
            self.append_newline()
            self.opts.keep_array_indentation = True
        else:
            self.append_newline()
    self.restore_mode()
    self.append_token(token_text)