Fix ktlint issues
This commit is contained in:
@@ -21,7 +21,6 @@ package io.element.android.libraries.core.cache
|
||||
* This class is not thread safe.
|
||||
*/
|
||||
class CircularCache<T : Any>(cacheSize: Int, factory: (Int) -> Array<T?>) {
|
||||
|
||||
companion object {
|
||||
inline fun <reified T : Any> create(cacheSize: Int) = CircularCache(cacheSize) { Array<T?>(cacheSize) { null } }
|
||||
}
|
||||
|
||||
@@ -26,20 +26,6 @@ inline fun <T> T.ooi(block: (T) -> Unit): T = also(block)
|
||||
*/
|
||||
fun CharSequence?.orEmpty() = this ?: ""
|
||||
|
||||
/**
|
||||
* Check if a CharSequence is a phone number.
|
||||
*/
|
||||
/*
|
||||
fun CharSequence.isMsisdn(): Boolean {
|
||||
return try {
|
||||
PhoneNumberUtil.getInstance().parse(ensurePrefix("+"), null)
|
||||
true
|
||||
} catch (e: NumberParseException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Useful to append a String at the end of a filename but before the extension if any
|
||||
* Ex:
|
||||
|
||||
@@ -23,7 +23,6 @@ package io.element.android.libraries.core.log.logger
|
||||
* Timber.tag(loggerTag.value).v("My log message")
|
||||
*/
|
||||
open class LoggerTag(name: String, parentTag: LoggerTag? = null) {
|
||||
|
||||
object PushLoggerTag : LoggerTag("Push")
|
||||
object NotificationLoggerTag : LoggerTag("Notification", PushLoggerTag)
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class BasicExtensionsTest {
|
||||
|
||||
@Test(expected = IllegalArgumentException::class)
|
||||
fun `test ellipsize at 0`() {
|
||||
"1234567890".ellipsize(0)
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Test
|
||||
|
||||
class ResultTest {
|
||||
|
||||
@Test
|
||||
fun testFlatMap() {
|
||||
val initial = Result.success("initial")
|
||||
|
||||
Reference in New Issue
Block a user