code: private function isMethod(Tokens $tokens, $index)
      {
          $tokensAnalyzer = new TokensAnalyzer($tokens);
  
          return $tokens[$index]->isGivenKind(T_FUNCTION) && !$tokensAnalyzer->isLambda($index);
      }
docs: @param Tokens $tokens
  @param int    $index
  
  @return bool