@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | foreach ($this->probabilities as $id => [$weight, $usageCounter]) { |
95 | - $score = $weight / ($usageCounter + 1); |
|
95 | + $score = $weight/($usageCounter+1); |
|
96 | 96 | |
97 | 97 | if ($this->areFloatsEqual($score, $maxScore) && $weight > $maxScoreWeight || $score > $maxScore) { |
98 | 98 | $maxScore = $score; |
@@ -143,6 +143,6 @@ discard block |
||
143 | 143 | */ |
144 | 144 | protected function areFloatsEqual(float $lhs, float $rhs): bool |
145 | 145 | { |
146 | - return \abs($lhs - $rhs) < PHP_FLOAT_EPSILON; |
|
146 | + return \abs($lhs-$rhs) < PHP_FLOAT_EPSILON; |
|
147 | 147 | } |
148 | 148 | } |