From c980c898de8417e16942741d469ebef8532b822a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 28 May 2024 15:11:50 +0530 Subject: chore: reformat with trailing commas changes --- .../src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt | 6 ++---- .../src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt | 6 ++---- .../src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt | 6 ++---- .../src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt | 5 +---- 4 files changed, 7 insertions(+), 16 deletions(-) (limited to 'crypto') diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt index 15ce92f0..4596478e 100644 --- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt +++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPDecryptOptions.kt @@ -1,10 +1,8 @@ package app.passwordstore.crypto /** [CryptoOptions] implementation for PGPainless decrypt operations. */ -public class PGPDecryptOptions -private constructor( - private val values: Map, -) : CryptoOptions { +public class PGPDecryptOptions private constructor(private val values: Map) : + CryptoOptions { override fun isOptionEnabled(option: String): Boolean { return values.getOrDefault(option, false) diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt index 90de6b51..09531b61 100644 --- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt +++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPEncryptOptions.kt @@ -1,10 +1,8 @@ package app.passwordstore.crypto /** [CryptoOptions] implementation for PGPainless encrypt operations. */ -public class PGPEncryptOptions -private constructor( - private val values: Map, -) : CryptoOptions { +public class PGPEncryptOptions private constructor(private val values: Map) : + CryptoOptions { internal companion object { const val ASCII_ARMOR = "ASCII_ARMOR" diff --git a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt index 8aa11803..cbaa110d 100644 --- a/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt +++ b/crypto/pgpainless/src/main/kotlin/app/passwordstore/crypto/PGPKeyManager.kt @@ -31,10 +31,8 @@ import org.pgpainless.util.selection.userid.SelectUserId public class PGPKeyManager @Inject -constructor( - filesDir: String, - private val dispatcher: CoroutineDispatcher, -) : KeyManager { +constructor(filesDir: String, private val dispatcher: CoroutineDispatcher) : + KeyManager { private val keyDir = File(filesDir, KEY_DIR_NAME) diff --git a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt index d0cc693e..8893d0eb 100644 --- a/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt +++ b/crypto/pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPKeyManagerTest.kt @@ -217,10 +217,7 @@ class PGPKeyManagerTest { KeyId(-961222705095032109), // Bobby ) val userIds = - arrayOf( - UserId("Alice "), - UserId("Bobby "), - ) + arrayOf(UserId("Alice "), UserId("Bobby ")) for (idCollection in arrayOf(longKeyIds, userIds)) { val alice1 = keyManager.getKeyById(idCollection[0]) -- cgit v1.2.3