private function fixWhitespace(Tokens $tokens, $index)
    {
        $content = $tokens[$index]->getContent();
        // if there is more than one new line in the whitespace, then we need to fix it
        if (substr_count($content, "\n") > 1) {
            // the final bit of the whitespace must be the next statement's indentation
            $tokens[$index] = new Token([T_WHITESPACE, $this->whitespacesConfig->getLineEnding().substr($content, strrpos($content, "\n") + 1)]);
        }
    }
private function fixWhitespace(Tokens $tokens, $index)
    {
        $content = $tokens[$index]->getContent();
        
        if (substr_count($content, "\n") > 1) {
            
            $tokens[$index] = new Token([T_WHITESPACE, $this->whitespacesConfig->getLineEnding().substr($content, strrpos($content, "\n") + 1)]);
        }
    }
private function fixWhitespace ( Tokens $ tokens , $ index ) { $ content = $ tokens [ $ index ] -> getContent ( ) ; // if there is more than one new line in the whitespace, then we need to fix it if ( substr_count ( $ content , "\n" ) > 1 ) { // the final bit of the whitespace must be the next statement's indentation $ tokens [ $ index ] = new Token ( [ T_WHITESPACE , $ this -> whitespacesConfig -> getLineEnding ( ) . substr ( $ content , strrpos ( $ content , "\n" ) + 1 ) ] ) ; } }
Cleanup a whitespace token.

@param Tokens $tokens
@param int    $index
Cleanup a whitespace token .