code: private function skipNonArrayElements($index, Tokens $tokens)
      {
          if ($tokens[$index]->equals('}')) {
              return $tokens->findBlockStart(Tokens::BLOCK_TYPE_CURLY_BRACE, $index);
          }
  
          if ($tokens[$index]->equals(')')) {
              $startIndex = $tokens->findBlockStart(Tokens::BLOCK_TYPE_PARENTHESIS_BRACE, $index);
              $startIndex = $tokens->getPrevMeaningfulToken($startIndex);
              if (!$tokens[$startIndex]->isGivenKind([T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN])) {
                  return $startIndex;
              }
          }
  
          return $index;
      }
docs: Method to move index over the non-array elements like function calls or function declarations.
  
  @param int    $index
  @param Tokens $tokens
  
  @return int New index