Skip to content

Commit cac0623

Browse files
committed
Refactor isSaveSpace method for improved readability and conciseness
1 parent 69eedd0 commit cac0623

File tree

1 file changed

+2
-5
lines changed
  • src/main/kotlin/org/domaframework/doma/intellij/formatter/block/group/keyword/option

1 file changed

+2
-5
lines changed

src/main/kotlin/org/domaframework/doma/intellij/formatter/block/group/keyword/option/SqlInGroupBlock.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ class SqlInGroupBlock(
6868

6969
override fun isSaveSpace(lastGroup: SqlBlock?): Boolean {
7070
if (lastGroup is SqlElConditionLoopCommentBlock) {
71-
return if (lastGroup.conditionType.isElse()) {
72-
false
73-
} else {
74-
!lastGroup.isBeforeParentBlock()
75-
}
71+
if (lastGroup.conditionType.isElse()) return false
72+
return !lastGroup.isBeforeParentBlock()
7673
}
7774
return false
7875
}

0 commit comments

Comments
 (0)