Skip to content

Commit 465d5ef

Browse files
committed
detekt
1 parent 1dec2e6 commit 465d5ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/kotlin/me/owdding/skyocean/config/patcher/RemovePatch.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ import kotlin.text.substringBeforeLast
1313
@GenerateCodec
1414
data class RemovePatch(val path: String) : Patch {
1515

16-
companion object {
17-
val ID: Identifier = SkyOcean.id("remove")
18-
val CODEC: MapCodec<RemovePatch> = SkyOceanCodecs.getMapCodec()
19-
}
20-
2116
override fun id(): Identifier = ID
2217
override fun patch(jsonObject: JsonObject) {
2318
val parent = path.substringBeforeLast(".", "")
2419
val entry = path.substringAfterLast(".")
2520
jsonObject.getPath(parent, true)?.asJsonObject?.remove(entry)
2621
}
22+
23+
companion object {
24+
val ID: Identifier = SkyOcean.id("remove")
25+
val CODEC: MapCodec<RemovePatch> = SkyOceanCodecs.getMapCodec()
26+
}
2727
}

0 commit comments

Comments
 (0)