From 2cedc5e0c3aeb9803265f7988aa04806d27c566b Mon Sep 17 00:00:00 2001 From: Ruben Date: Sat, 17 Sep 2016 19:45:02 +0100 Subject: [PATCH] Fix min/max mixup --- src/Api/ScoreControllerProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/ScoreControllerProvider.php b/src/Api/ScoreControllerProvider.php index 62bc756..d8fa527 100644 --- a/src/Api/ScoreControllerProvider.php +++ b/src/Api/ScoreControllerProvider.php @@ -285,7 +285,8 @@ class ScoreControllerProvider implements ControllerProviderInterface foreach($conversions as $from => $to) { $value = $hit->getExpressions()->getExpressionScore($from) / 100; foreach($to as $t) { - $data['unit_poses'][$t] = isSet($data['unit_poses'][$t]) ? max(1,$data['unit_poses'][$t]+$value) : $value; + $data['unit_poses'][$t] = isSet($data['unit_poses'][$t]) ? min(1,$data['unit_poses'][$t]+$value) : $value; + // $data['description'] .= " $from => $t"; } }