aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlad <vlad@driver.xyz>2017-09-27 02:25:56 -0700
committervlad <vlad@driver.xyz>2017-09-27 02:25:56 -0700
commit68b02317d9a296da8c4b8e389b726c1a122a5b5e (patch)
tree41609c744eeb1f43d7e3cd956f88b725e9f580fe
parent36d217f00374525f604233e2ec248b9cca155bea (diff)
downloadrest-query-0.3.22.tar.gz
rest-query-0.3.22.tar.bz2
rest-query-0.3.22.zip
Scalafmtv0.3.22
-rw-r--r--src/main/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala6
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala7
2 files changed, 5 insertions, 8 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala b/src/main/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala
index 11d336e..e0adeb8 100644
--- a/src/main/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala
+++ b/src/main/scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala
@@ -17,7 +17,7 @@ object SearchFilterParser {
val (dimensionName, (strOperation, value)) = input
val updatedValue = value match {
case s: String => s.safeTrim
- case a => a
+ case a => a
}
parseOperation(strOperation.toLowerCase).map { op =>
@@ -96,12 +96,12 @@ object SearchFilterParser {
private val nAryValueParser: Parser[String] = P(CharPred(_ != ',').rep(min = 1).!)
- private val longParser: Parser[Long] = P(CharIn('0'to'9').rep(1).!.map(_.toLong))
+ private val longParser: Parser[Long] = P(CharIn('0' to '9').rep(1).!.map(_.toLong))
private val binaryAtomParser: Parser[SearchFilterExpr.Atom.Binary] = P(
dimensionParser ~ whitespaceParser ~ (
(numericOperatorParser.! ~ whitespaceParser ~ (longParser | numberParser.!)) |
- (commonOperatorParser.! ~ whitespaceParser ~ AnyChar.rep(min = 1).!)
+ (commonOperatorParser.! ~ whitespaceParser ~ AnyChar.rep(min = 1).!)
) ~ End
).map {
case BinaryAtomFromTuple(atom) => atom
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala
index 60b74ff..cf55694 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala
@@ -27,7 +27,7 @@ object ExportTrialWithLabels {
def fromRaw(rawData: List[RawTrialLabel]): ExportTrialWithLabels = {
val trials: Set[StringId[Trial]] = rawData.map(_.nctId)(breakOut)
- assert(trials.size == 1, "There are more than one trials in the rawData")
+ assert(trials.size == 1, "There are more than one trial in the rawData")
val trial = rawData.head
ExportTrialWithLabels(
@@ -43,9 +43,7 @@ object ExportTrialWithLabels {
ExportTrialArm(armId, rawTrials.head.armName)
}(breakOut),
criteria = rawData
- .groupBy { x =>
- (x.criterionId, x.labelId)
- }
+ .groupBy(x => (x.criterionId, x.labelId))
.map {
case (_, rawTrialLabels) =>
val armIds = rawTrialLabels.map(_.criterionArmId).toSet
@@ -53,5 +51,4 @@ object ExportTrialWithLabels {
}(breakOut)
)
}
-
}