src/Tokenizer/Transformer/UseTransformer.php
private function isUseForLambda(Tokens $tokens, $index)
    {
        $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];

        // test `function () use ($foo) {}` case
        return $nextToken->equals('(');
    }
private function isUseForLambda(Tokens $tokens, $index)
    {
        $nextToken = $tokens[$tokens->getNextMeaningfulToken($index)];

        // test `function () use ($foo) {}` case
        return $nextToken->equals('(');
    }
private function isUseForLambda ( Tokens $ tokens , $ index ) { $ nextToken = $ tokens [ $ tokens -> getNextMeaningfulToken ( $ index ) ] ; // test `function () use ($foo) {}` case return $ nextToken -> equals ( '(' ) ; }
Check if token under given index is `use` statement for lambda function.

@param Tokens $tokens
@param int    $index

@return bool
Check if token under given index is use statement for lambda function .