From 9d71b7a598bd9bb54b8511ed79f704692d6fec79 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 19 May 2024 02:13:01 -0700 Subject: [PATCH] Added return types to builder functions. --- .../kotlin/net/thauvin/erik/readingtime/Config.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/readingtime/Config.kt b/src/main/kotlin/net/thauvin/erik/readingtime/Config.kt index 3eb3bc2..d994592 100644 --- a/src/main/kotlin/net/thauvin/erik/readingtime/Config.kt +++ b/src/main/kotlin/net/thauvin/erik/readingtime/Config.kt @@ -70,37 +70,37 @@ class Config private constructor(builder: Builder) { /** * The text to be evaluated. */ - fun text(text: String) = apply { this.text = text } + fun text(text: String): Builder = apply { this.text = text } /** * The words per minute reading average. */ - fun wpm(wpm: Int) = apply { this.wpm = wpm } + fun wpm(wpm: Int): Builder = apply { this.wpm = wpm } /** * The value to be appended to the reading time. */ - fun postfix(postfix: String) = apply { this.postfix = postfix } + fun postfix(postfix: String): Builder = apply { this.postfix = postfix } /** * The value to be appended if the reading time is more than 1 minute. */ - fun plural(plural: String) = apply { this.plural = plural } + fun plural(plural: String): Builder = apply { this.plural = plural } /** * Images are excluded from the reading time when set. */ - fun excludeImages(excludeImages: Boolean) = apply { this.excludeImages = excludeImages } + fun excludeImages(excludeImages: Boolean): Builder = apply { this.excludeImages = excludeImages } /** * Additional seconds to be added to the total reading time. */ - fun extra(extra: Int) = apply { this.extra = extra } + fun extra(extra: Int): Builder = apply { this.extra = extra } /** * The [RoundingMode] to apply. Default is [RoundingMode.HALF_DOWN]. */ - fun roundingMode(roundingMode: RoundingMode) = apply { this.roundingMode = roundingMode } + fun roundingMode(roundingMode: RoundingMode): Builder = apply { this.roundingMode = roundingMode } /** * Builds the configuration.