protected function inAtRuleBodyState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_CLOSINGBRACE) {
            $buffer = implode('', $this->getBuffer());
            $openingCount = substr_count($buffer, self::CHAR_OPENINGBRACE);
            $closingCount = substr_count($buffer, self::CHAR_CLOSINGBRACE) + 1;

            if ($openingCount === $closingCount) {
                $this->cleanBuffer();
                $this->setState(self::RUNNING);
            } else {
                $this->bufferize($char);
            }
        } else {
            $this->bufferize($char);
        }

        $this->output($char);
    }
protected function inAtRuleBodyState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_CLOSINGBRACE) {
            $buffer = implode('', $this->getBuffer());
            $openingCount = substr_count($buffer, self::CHAR_OPENINGBRACE);
            $closingCount = substr_count($buffer, self::CHAR_CLOSINGBRACE) + 1;

            if ($openingCount === $closingCount) {
                $this->cleanBuffer();
                $this->setState(self::RUNNING);
            } else {
                $this->bufferize($char);
            }
        } else {
            $this->bufferize($char);
        }

        $this->output($char);
    }
protected function inAtRuleBodyState ( ) { $ char = $ this -> getCurrentChar ( ) ; if ( $ char === self :: CHAR_CLOSINGBRACE ) { $ buffer = implode ( '' , $ this -> getBuffer ( ) ) ; $ openingCount = substr_count ( $ buffer , self :: CHAR_OPENINGBRACE ) ; $ closingCount = substr_count ( $ buffer , self :: CHAR_CLOSINGBRACE ) + 1 ; if ( $ openingCount === $ closingCount ) { $ this -> cleanBuffer ( ) ; $ this -> setState ( self :: RUNNING ) ; } else { $ this -> bufferize ( $ char ) ; } } else { $ this -> bufferize ( $ char ) ; } $ this -> output ( $ char ) ; }
Instructions to be performed in 'atRuleBody' state.
Instructions to be performed in atRuleBody state .