PsiStatement[] (PsiStatement[] statements, @NotNull PsiExpression expr) { PsiStatement[] result = ArrayUtil.copyOf(statements); PsiStatement yieldStatement = createYieldStatement(expr); result[result.length - 1] = yieldStatement; return result; }