From c28b1ab11ef0fdccbc5d4a416ac0a07728e2fb01 Mon Sep 17 00:00:00 2001 From: usbharu Date: Tue, 28 Nov 2023 12:41:26 +0900 Subject: [PATCH] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../activitypub/domain/model/Accept.kt | 14 +++++++----- .../activitypub/domain/model/Create.kt | 16 +++++++------- .../hideout/activitypub/domain/model/Like.kt | 14 ++++++------ .../hideout/activitypub/domain/model/Note.kt | 22 +++++++++---------- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Accept.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Accept.kt index 93ded2d2..2cd730db 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Accept.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Accept.kt @@ -15,7 +15,9 @@ open class Accept @JsonCreator constructor( override val actor: String ) : Object( type = add(type, "Accept") -), HasActor, HasName { +), + HasActor, + HasName { override fun equals(other: Any?): Boolean { if (this === other) return true @@ -41,10 +43,10 @@ open class Accept @JsonCreator constructor( override fun toString(): String { return "Accept(" + - "name='$name', " + - "apObject=$apObject, " + - "actor='$actor'" + - ")" + - " ${super.toString()}" + "name='$name', " + + "apObject=$apObject, " + + "actor='$actor'" + + ")" + + " ${super.toString()}" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Create.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Create.kt index 3353ea3c..d5b269dd 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Create.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Create.kt @@ -52,13 +52,13 @@ open class Create( override fun toString(): String { return "Create(" + - "name='$name', " + - "apObject=$apObject, " + - "actor='$actor', " + - "id='$id', " + - "to=$to, " + - "cc=$cc" + - ")" + - " ${super.toString()}" + "name='$name', " + + "apObject=$apObject, " + + "actor='$actor', " + + "id='$id', " + + "to=$to, " + + "cc=$cc" + + ")" + + " ${super.toString()}" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Like.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Like.kt index 39ef65a2..ec8e8ec7 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Like.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Like.kt @@ -46,12 +46,12 @@ open class Like( override fun toString(): String { return "Like(" + - "actor='$actor', " + - "id='$id', " + - "apObject='$apObject', " + - "content='$content', " + - "tag=$tag" + - ")" + - " ${super.toString()}" + "actor='$actor', " + + "id='$id', " + + "apObject='$apObject', " + + "content='$content', " + + "tag=$tag" + + ")" + + " ${super.toString()}" } } diff --git a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Note.kt b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Note.kt index 91bf8a86..2b16e1c4 100644 --- a/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Note.kt +++ b/src/main/kotlin/dev/usbharu/hideout/activitypub/domain/model/Note.kt @@ -56,16 +56,16 @@ constructor( override fun toString(): String { return "Note(" + - "id='$id', " + - "attributedTo='$attributedTo', " + - "content='$content', " + - "published='$published', " + - "to=$to, " + - "cc=$cc, " + - "sensitive=$sensitive, " + - "inReplyTo=$inReplyTo, " + - "attachment=$attachment" + - ")" + - " ${super.toString()}" + "id='$id', " + + "attributedTo='$attributedTo', " + + "content='$content', " + + "published='$published', " + + "to=$to, " + + "cc=$cc, " + + "sensitive=$sensitive, " + + "inReplyTo=$inReplyTo, " + + "attachment=$attachment" + + ")" + + " ${super.toString()}" } }