From 68b02317d9a296da8c4b8e389b726c1a122a5b5e Mon Sep 17 00:00:00 2001 From: vlad Date: Wed, 27 Sep 2017 02:25:56 -0700 Subject: Scalafmt --- .../scala/xyz/driver/pdsuicommon/parsers/SearchFilterParser.scala | 6 +++--- .../pdsuidomain/entities/export/trial/ExportTrialWithLabels.scala | 7 ++----- 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) ) } - } -- cgit v1.2.3