private function removeWhitespace(): void
    {
        $string = preg_replace('/ {2,}/', Tokens::SPACE, $this->normalisedString);
        $lines = [];

        foreach (explode(Tokens::LINE_FEED, $string) as $line) {
            if ('' !== $line = trim($line)) {
                $lines[] = $line;
            }
        }
        $this->normalisedString = implode(Tokens::LINE_FEED, $lines);
    }
private function removeWhitespace(): void
    {
        $string = preg_replace('/ {2,}/', Tokens::SPACE, $this->normalisedString);
        $lines = [];

        foreach (explode(Tokens::LINE_FEED, $string) as $line) {
            if ('' !== $line = trim($line)) {
                $lines[] = $line;
            }
        }
        $this->normalisedString = implode(Tokens::LINE_FEED, $lines);
    }
private function removeWhitespace ( ) : void { $ string = preg_replace ( '/ {2,}/' , Tokens :: SPACE , $ this -> normalisedString ) ; $ lines = [ ] ; foreach ( explode ( Tokens :: LINE_FEED , $ string ) as $ line ) { if ( '' !== $ line = trim ( $ line ) ) { $ lines [ ] = $ line ; } } $ this -> normalisedString = implode ( Tokens :: LINE_FEED , $ lines ) ; }
Remove superfluous whitespace characters from string.
Remove superfluous whitespace characters from string .