protected function prettyPrint($code, $before = 0, $after = 0)
    {
        $this->offset += $before;

        if ($this->offset < 0) {
            $this->offset = 0;
        }

        $code = str_replace(
            ['\r', '\n', '\t', '\1', '\2'],
            [
                "\n",
                '"\n"',
                str_repeat('    ', $this->offset),
                str_repeat('    ', 1),
                str_repeat('    ', 2)
            ],
            $code
        );

        $this->offset += $after;

        if ($this->offset < 0) {
            $this->offset = 0;
        }

        $code = str_replace('\\' . $this->bars[0], $this->bars[0], $code);
        $code = str_replace('\\' . $this->bars[1], $this->bars[1], $code);

        //''."\n"
        $code = str_replace(' \'\'."\n"', ' "\n"', $code);

        if ($code === '$buffer .= \'\';') {
            return '';
        }

        return $code;
    }
protected function prettyPrint($code, $before = 0, $after = 0)
    {
        $this->offset += $before;

        if ($this->offset < 0) {
            $this->offset = 0;
        }

        $code = str_replace(
            ['\r', '\n', '\t', '\1', '\2'],
            [
                "\n",
                '"\n"',
                str_repeat('    ', $this->offset),
                str_repeat('    ', 1),
                str_repeat('    ', 2)
            ],
            $code
        );

        $this->offset += $after;

        if ($this->offset < 0) {
            $this->offset = 0;
        }

        $code = str_replace('\\' . $this->bars[0], $this->bars[0], $code);
        $code = str_replace('\\' . $this->bars[1], $this->bars[1], $code);

        //''."\n"
        $code = str_replace(' \'\'."\n"', ' "\n"', $code);

        if ($code === '$buffer .= \'\';') {
            return '';
        }

        return $code;
    }
protected function prettyPrint ( $ code , $ before = 0 , $ after = 0 ) { $ this -> offset += $ before ; if ( $ this -> offset < 0 ) { $ this -> offset = 0 ; } $ code = str_replace ( [ '\r' , '\n' , '\t' , '\1' , '\2' ] , [ "\n" , '"\n"' , str_repeat ( '    ' , $ this -> offset ) , str_repeat ( '    ' , 1 ) , str_repeat ( '    ' , 2 ) ] , $ code ) ; $ this -> offset += $ after ; if ( $ this -> offset < 0 ) { $ this -> offset = 0 ; } $ code = str_replace ( '\\' . $ this -> bars [ 0 ] , $ this -> bars [ 0 ] , $ code ) ; $ code = str_replace ( '\\' . $ this -> bars [ 1 ] , $ this -> bars [ 1 ] , $ code ) ; //''."\n" $ code = str_replace ( ' \'\'."\n"' , ' "\n"' , $ code ) ; if ( $ code === '$buffer .= \'\';' ) { return '' ; } return $ code ; }
Makes code look nicely spaced

@param *string $code
@param int     $before Used to set the token before spacing
@param int     $after Used to set the token after spacing

@return string
Makes code look nicely spaced