boolean (@NotNull PsiCodeBlock body) { final PsiStatement statement = ControlFlowUtils.getOnlyStatementInBlock(body); if (!(statement instanceof PsiReturnStatement returnStatement)) { return false; } final PsiExpression value = returnStatement.getReturnValue(); return value != null && PsiUtil.isConstantExpression(value); }