src/helpers/helpers.php
/**
 * Pass the tokens in by reference and modify them
 * @param array $tokens
 * @param string $filterType
 */
Pass the tokens in by reference and modify them
@param array $tokens
@param string $filterType
Pass the tokens in by reference and modify them @param array $tokens @param string $filterType
function filter_tokens(array &$tokens, string $filterType)
{
    $className = "\\TextAnalysis\\Filters\\{$filterType}";
    $filter = new $className();
    foreach($tokens as &$token)
    {
        $token = $filter->transform($token);
    }
}
function filter_tokens ( array & $ tokens , string $ filterType ) { $ className = " \\ TextAnalysis \\ Filters \\ { $ filterType } " ; $ filter = new $ className ( ) ; foreach ( $ tokens as & $ token ) { $ token = $ filter -> transform ( $ token ) ; } }
Pass the tokens in by reference and modify them
 @param array $tokens
 @param string $filterType
Pass the tokens in by reference and modify them @param array $tokens @param string $filterType