protected function filterTokens(array $tokens)
    {
        $filteredTokens = array_filter($tokens, function (Token $t) {
            return $t->getType() !== TokenType::Whitespace;
        });

        // Return the array values only, because array_filter preserves the keys
        return array_values($filteredTokens);
    }
protected function filterTokens(array $tokens)
    {
        $filteredTokens = array_filter($tokens, function (Token $t) {
            return $t->getType() !== TokenType::Whitespace;
        });

        // Return the array values only, because array_filter preserves the keys
        return array_values($filteredTokens);
    }
protected function filterTokens ( array $ tokens ) { $ filteredTokens = array_filter ( $ tokens , function ( Token $ t ) { return $ t -> getType ( ) !== TokenType :: Whitespace ; } ) ; // Return the array values only, because array_filter preserves the keys return array_values ( $ filteredTokens ) ; }
Remove Whitespace from the token list.

@param array $tokens Input list of tokens
@retval Token[]
Remove Whitespace from the token list .