src/Tokenizer/Transformer/ReturnRefTransformer.php
public function process(Tokens $tokens, Token $token, $index)
    {
        if (
            $token->equals('&')
            && $tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_FUNCTION)
        ) {
            $tokens[$index] = new Token([CT::T_RETURN_REF, '&']);
        }
    }
public function process(Tokens $tokens, Token $token, $index)
    {
        if (
            $token->equals('&')
            && $tokens[$tokens->getPrevMeaningfulToken($index)]->isGivenKind(T_FUNCTION)
        ) {
            $tokens[$index] = new Token([CT::T_RETURN_REF, '&']);
        }
    }
{@inheritdoc}