From 8d61eb9f23b80853a3a3a266dc91c5b8aadf15e3 Mon Sep 17 00:00:00 2001 From: zitivapo Date: Tue, 4 Apr 2017 13:52:42 +0200 Subject: [PATCH] Druid: Query: Aggregation: TopN: fix threshold setter by ensuring particular interface __toString() call --- src/Druid/Query/Aggregation/TopN.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Druid/Query/Aggregation/TopN.php b/src/Druid/Query/Aggregation/TopN.php index ef1a0d7..e596b31 100644 --- a/src/Druid/Query/Aggregation/TopN.php +++ b/src/Druid/Query/Aggregation/TopN.php @@ -85,7 +85,7 @@ public function getDimension() */ public function setThreshold(ThresholdInterface $threshold) { - $this->threshold = $threshold; + $this->threshold = (int)(string)$threshold; return $this; } @@ -104,7 +104,7 @@ public function setMetric(MetricInterface $metric) */ public function getThreshold() { - return (int)(string)$this->threshold; + return (int)$this->threshold; } /**