Skip to content

Commit 2ad8edf

Browse files
committed
Satisfy detekt and checkstyle
- @Suppress("ReturnCount") on ensureAuth — its five returns are each a distinct auth outcome; a single-return rewrite would read worse. - Drop a stray blank line before a brace left from removing a test region.
1 parent 80bd4cd commit 2ad8edf

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

WordPress/src/main/java/org/wordpress/android/repositories/SiteProvisioningSource.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ class SiteProvisioningSource @Inject constructor(
159159
* confirmed rejection wipes them and mints fresh ones via the FluxC Jetpack
160160
* tunnel. The mint persists the credentials, so later stages read them back.
161161
*/
162+
// Each return is a distinct auth outcome (missing site, valid, transient, minted, failed);
163+
// collapsing to one return would thread a result through nested branches and read worse.
164+
@Suppress("ReturnCount")
162165
private suspend fun ensureAuth(siteLocalId: Int): SiteAuthState {
163166
val site = siteStore.getSiteByLocalId(siteLocalId)
164167
?: return SiteAuthState.Unprovisionable(hadCredentials = false)

WordPress/src/test/java/org/wordpress/android/ui/posts/GutenbergEditorPreloaderTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,5 +481,4 @@ class GutenbergEditorPreloaderTest :
481481
}
482482

483483
// endregion
484-
485484
}

0 commit comments

Comments
 (0)