code: private function fixElseif($index, Token $token, Tokens $tokens)
      {
          if (!$token->isGivenKind(T_ELSEIF)) {
              return;
          }
          $parenthesisEndIndex = $this->findParenthesisEnd($tokens, $index);
          $tokenAfterParenthesisIndex = $tokens->getNextMeaningfulToken($parenthesisEndIndex);
          $tokenAfterParenthesis = $tokens[$tokenAfterParenthesisIndex];
          if (!$tokenAfterParenthesis->equals(':')) {
              return;
          }
  
          $this->addBraces($tokens, new Token([T_ELSEIF, 'elseif']), $index, $tokenAfterParenthesisIndex);
      }
docs: Handle the elsif(): cases.
  
  @param int    $index  the index of the token being processed
  @param Token  $token  the token being processed
  @param Tokens $tokens the collection of tokens