protected function isWhitespaceRequired() {
        $result = false;
        if (!empty($this->compressedCode) && $this->currentPosition < $this->codeLength) {
            $compressedLength = strlen($this->compressedCode);
            $lastChar = $this->compressedCode{$compressedLength - 1};
            $nextChar = $this->code{$this->currentPosition};
            if ($lastChar === '}' && $nextChar === '}' && $compressedLength >= 2) {
                $secondLastChar = $this->compressedCode{$compressedLength - 2};
                $result = ($secondLastChar === '}');
            } else {
                $result = !in_array($lastChar, $this->ignoreFollowingWhitespace)
                    && !in_array($nextChar, $this->ignoreFollowingWhitespace);
            }
        }
        return $result;
    }