IfConditionalModel (PsiExpression condition, PsiYieldStatement thenBranch, PsiYieldStatement elseBranch) { if (thenBranch == null || elseBranch == null) return null; final PsiExpression thenBreak = thenBranch.getExpression(); if (thenBreak == null) return null; final PsiExpression elseBreak = elseBranch.getExpression(); if (elseBreak == null) return null; PsiType type = getType(condition, thenBreak, elseBreak); if (type == null) return null; return new IfConditionalModel(condition, thenBreak, elseBreak, thenBranch, elseBranch, type); }