code: private function isPrivateMethod(Tokens $tokens, $index, $classOpenIndex)
      {
          $index = max($classOpenIndex + 1, $tokens->getPrevTokenOfKind($index, [';', '{', '}']));
  
          while (!$tokens[$index]->isGivenKind(T_FUNCTION)) {
              if ($tokens[$index]->isGivenKind(T_PRIVATE)) {
                  return true;
              }
  
              ++$index;
          }
  
          return false;
      }
docs: @param Tokens $tokens
  @param int    $index
  @param int    $classOpenIndex
  
  @return bool