Skip to content

Commit 285a529

Browse files
committed
Spotless
1 parent bcbf83f commit 285a529

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/model/Values.kt

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -191,25 +191,25 @@ internal object Values {
191191
else -> false
192192
}
193193

194-
private fun strictArrayEquals(left: Value, right: Value): Boolean? {
195-
val leftArray = left.arrayValue
196-
val rightArray = right.arrayValue
194+
private fun strictArrayEquals(left: Value, right: Value): Boolean? {
195+
val leftArray = left.arrayValue
196+
val rightArray = right.arrayValue
197197

198-
if (leftArray.valuesCount != rightArray.valuesCount) {
199-
return false
200-
}
198+
if (leftArray.valuesCount != rightArray.valuesCount) {
199+
return false
200+
}
201201

202-
var foundNull = false
203-
for (i in 0 until leftArray.valuesCount) {
204-
val equals = strictEquals(leftArray.getValues(i), rightArray.getValues(i))
205-
if (equals === null) {
206-
foundNull = true
207-
} else if (!equals) {
208-
return false
209-
}
210-
}
211-
return if (foundNull) null else true
202+
var foundNull = false
203+
for (i in 0 until leftArray.valuesCount) {
204+
val equals = strictEquals(leftArray.getValues(i), rightArray.getValues(i))
205+
if (equals === null) {
206+
foundNull = true
207+
} else if (!equals) {
208+
return false
209+
}
212210
}
211+
return if (foundNull) null else true
212+
}
213213

214214
private fun arrayEquals(left: Value, right: Value): Boolean {
215215
val leftArray = left.arrayValue
@@ -677,7 +677,8 @@ internal object Values {
677677
fun encodeValue(timestamp: com.google.firebase.Timestamp): Value =
678678
encodeValue(timestamp(timestamp.seconds, timestamp.nanoseconds))
679679

680-
@JvmStatic fun encodeValue(value: Timestamp): Value = Value.newBuilder().setTimestampValue(value).build()
680+
@JvmStatic
681+
fun encodeValue(value: Timestamp): Value = Value.newBuilder().setTimestampValue(value).build()
681682

682683
@JvmField val TRUE_VALUE: Value = Value.newBuilder().setBooleanValue(true).build()
683684

firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/expressions.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,8 @@ abstract class Expr internal constructor() {
798798
* @param second Numeric expression to add.
799799
* @return A new [Expr] representing the addition operation.
800800
*/
801-
@JvmStatic fun add(first: Expr, second: Expr): Expr = FunctionExpr("add", evaluateAdd, first, second)
801+
@JvmStatic
802+
fun add(first: Expr, second: Expr): Expr = FunctionExpr("add", evaluateAdd, first, second)
802803

803804
/**
804805
* Creates an expression that adds numeric expressions with a constant.
@@ -807,7 +808,8 @@ abstract class Expr internal constructor() {
807808
* @param second Constant to add.
808809
* @return A new [Expr] representing the addition operation.
809810
*/
810-
@JvmStatic fun add(first: Expr, second: Number): Expr = FunctionExpr("add", evaluateAdd, first, second)
811+
@JvmStatic
812+
fun add(first: Expr, second: Number): Expr = FunctionExpr("add", evaluateAdd, first, second)
811813

812814
/**
813815
* Creates an expression that adds a numeric field with a numeric expression.
@@ -883,7 +885,8 @@ abstract class Expr internal constructor() {
883885
* @return A new [Expr] representing the multiplication operation.
884886
*/
885887
@JvmStatic
886-
fun multiply(first: Expr, second: Expr): Expr = FunctionExpr("multiply", evaluateMultiply, first, second)
888+
fun multiply(first: Expr, second: Expr): Expr =
889+
FunctionExpr("multiply", evaluateMultiply, first, second)
887890

888891
/**
889892
* Creates an expression that multiplies numeric expressions with a constant.
@@ -893,7 +896,8 @@ abstract class Expr internal constructor() {
893896
* @return A new [Expr] representing the multiplication operation.
894897
*/
895898
@JvmStatic
896-
fun multiply(first: Expr, second: Number): Expr = FunctionExpr("multiply", evaluateMultiply, first, second)
899+
fun multiply(first: Expr, second: Number): Expr =
900+
FunctionExpr("multiply", evaluateMultiply, first, second)
897901

898902
/**
899903
* Creates an expression that multiplies a numeric field with a numeric expression.

0 commit comments

Comments
 (0)