getTokens(); $nextToken = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); if ($tokens[$nextToken]['code'] !== T_IF) { return; } $error = 'Usage of ELSE IF not allowed; use ELSEIF instead'; $phpcsFile->addError($error, $stackPtr, 'NotAllowed'); } }