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