Passed
Push — master ( 411db0...7c7694 )
by Smoren
11:47 queued 09:27
created
src/ProbabilitySelector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
         $maxDeviationId = null;
79 79
 
80 80
         foreach ($this->probabilities as $id => [$weight, $usageCounter]) {
81
-            $probability = $this->weightSum ? $weight / $this->weightSum : 0;
82
-            $usageDistribution = $this->usageCounterSum > 0 ? $usageCounter / $this->usageCounterSum : 0;
83
-            $deviation = $probability - $usageDistribution;
81
+            $probability = $this->weightSum ? $weight/$this->weightSum : 0;
82
+            $usageDistribution = $this->usageCounterSum > 0 ? $usageCounter/$this->usageCounterSum : 0;
83
+            $deviation = $probability-$usageDistribution;
84 84
 
85 85
             if ($probability > $maxProbability) {
86 86
                 $maxProbability = $probability;
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
         }
137 137
 
138 138
         if ($this->usageCounterSum == 0) {
139
-            return $weight / $this->weightSum;
139
+            return $weight/$this->weightSum;
140 140
         }
141 141
 
142
-        return $usageCounter / $this->usageCounterSum - $weight / $this->weightSum;
142
+        return $usageCounter/$this->usageCounterSum-$weight/$this->weightSum;
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.