src/Fixer/ControlStructure/NoSuperfluousElseifFixer.php
private function isElseif(Tokens $tokens, $index)
    {
        if ($tokens[$index]->isGivenKind(T_ELSEIF)) {
            return true;
        }

        return $tokens[$index]->isGivenKind(T_ELSE) && $tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_IF);
    }
private function isElseif(Tokens $tokens, $index)
    {
        if ($tokens[$index]->isGivenKind(T_ELSEIF)) {
            return true;
        }

        return $tokens[$index]->isGivenKind(T_ELSE) && $tokens[$tokens->getNextMeaningfulToken($index)]->isGivenKind(T_IF);
    }
@param Tokens $tokens
@param int    $index

@return bool