private function _processBracesClose($token) {

		// signifies the end of a block
		// currently tests whether this token resides on a new line.
		// This test is deactivated when in a view
		if ($this->_isActive('controlCloseCurly') && !($this->_isView) && !($this->_inString)) {
			$previousToken = $this->tokenizer->peekPrvsValidToken();
			if (($previousToken->line === $token->line) && ($previousToken->id !== T_BRACES_OPEN)) {
				// the last token was on the same line
				$this->_writeError('controlCloseCurly', $this->_getMessage("END_BLOCK_NEW_LINE"));
			}
		}

		$currentStackItem = $this->statementStack->getCurrentStackItem();

		// Workaround code
		if (!is_String($currentStackItem)) {

			// Test for the end of a switch bloc
			if ($currentStackItem->type === StatementItem::TYPE_SWITCH || $currentStackItem->type === StatementItem::TYPE_DEFAULT || $currentStackItem->type === StatementItem::TYPE_CASE) {
				$this->_processSwitchStop();
			}

			// Test for the end of a function
			if ($currentStackItem->type === StatementItem::TYPE_FUNCTION) {
				$this->_processFunctionStop();
			}

			// Test for the end of a class
			if ($currentStackItem->type === StatementItem::TYPE_CLASS) {
				$this->_processClassStop();
			}

			// Test for the end of an interface
			if ($currentStackItem->type === StatementItem::TYPE_INTERFACE) {
				$this->_processInterfaceStop();
			}
		}
		$this->statementStack->pop();

		// Particular case of a ELSE IF {}
		// We unstack both the IF and the ELSE
		$isElse = ($currentStackItem->type === StatementItem::TYPE_ELSE);
		$isIf = ($this->statementStack->getCurrentStackItem()->type === StatementItem::TYPE_IF);
		$isNoCurly = $this->statementStack->getCurrentStackItem()->noCurly;
		if ($isElse && $isIf && $isNoCurly) {
			$this->statementStack->pop();
		}
	}