Completed
Push — dev ( 021c9f...a2bcd2 )
by Jordan
02:02
created
src/Samsara/Fermat/Provider/Stats/Distribution/Exponential.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
     }
179 179
 
180 180
     /**
181
-     * @param int|float|DecimalInterface $min
181
+     * @param integer $min
182 182
      * @param int|float|DecimalInterface $max
183 183
      * @param int $maxIterations
184 184
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
         $randFactory = new Factory();
169 169
         $generator = $randFactory->getMediumStrengthGenerator();
170 170
         $one = Numbers::makeOne();
171
-        $u = $generator->generateInt() / PHP_INT_MAX;
171
+        $u = $generator->generateInt()/PHP_INT_MAX;
172 172
 
173 173
         /** @var ImmutableNumber $random */
174 174
         $random = $one->subtract($u)->ln()->divide($this->lambda->multiply(-1));
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/Stats/Distribution/Normal.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
     }
159 159
 
160 160
     /**
161
-     * @param int|float|NumberInterface $min
161
+     * @param integer $min
162 162
      * @param int|float|NumberInterface $max
163 163
      * @param int $maxIterations
164 164
      *
Please login to merge, or discard this patch.
Unused Use Statements   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Samsara\Fermat\Provider\Stats\Distribution;
4 4
 
5
-use RandomLib\Factory;
6
-use Samsara\Exceptions\UsageError\OptionalExit;
7
-use Samsara\Fermat\Numbers;
8
-use Samsara\Fermat\Provider\Stats\Stats;
9
-use Samsara\Fermat\Types\Base\NumberInterface;
5
+use RandomLib\Factory;
6
+use Samsara\Exceptions\UsageError\OptionalExit;
7
+use Samsara\Fermat\Numbers;
8
+use Samsara\Fermat\Provider\Stats\Stats;
9
+use Samsara\Fermat\Types\Base\NumberInterface;
10 10
 use Samsara\Fermat\Values\ImmutableNumber;
11 11
 
12 12
 class Normal
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/Stats/Distribution/Poisson.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
      * WARNING: This function is of very limited use with Poisson distributions, and may represent a SIGNIFICANT
164 164
      * performance hit for certain values of $min, $max, $lambda, and $maxIterations
165 165
      *
166
-     * @param int|float|NumberInterface $min
166
+     * @param integer $min
167 167
      * @param int|float|NumberInterface $max
168 168
      * @param int $maxIterations
169 169
      *
Please login to merge, or discard this patch.
Unused Use Statements   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,12 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Samsara\Fermat\Provider\Stats\Distribution;
4 4
 
5
-use RandomLib\Factory;
6
-use Samsara\Exceptions\UsageError\IntegrityConstraint;
7
-use Samsara\Exceptions\UsageError\OptionalExit;
8
-use Samsara\Fermat\Numbers;
9
-use Samsara\Fermat\Provider\Stats\Distribution\Base\DistributionInterface;
10
-use Samsara\Fermat\Types\Base\NumberInterface;
5
+use RandomLib\Factory;
6
+use Samsara\Exceptions\UsageError\IntegrityConstraint;
7
+use Samsara\Exceptions\UsageError\OptionalExit;
8
+use Samsara\Fermat\Numbers;
9
+use Samsara\Fermat\Types\Base\NumberInterface;
11 10
 use Samsara\Fermat\Values\ImmutableNumber;
12 11
 
13 12
 class Poisson
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $cumulative = Numbers::makeZero();
65 65
 
66
-        for ($i = 0;$x->isGreaterThanOrEqualTo($i);$i++) {
66
+        for ($i = 0; $x->isGreaterThanOrEqualTo($i); $i++) {
67 67
             $cumulative = $cumulative->add($this->pmf($i));
68 68
         }
69 69
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $cumulative = Numbers::makeZero();
135 135
 
136
-        for (;$larger->isGreaterThanOrEqualTo($smaller);$smaller->add(1)) {
136
+        for (;$larger->isGreaterThanOrEqualTo($smaller); $smaller->add(1)) {
137 137
             $cumulative = $cumulative->add($this->pmf($smaller));
138 138
         }
139 139
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         while (true) {
220 220
             /** @var ImmutableNumber $u */
221
-            $u = $generator->generateInt() / PHP_INT_MAX;
221
+            $u = $generator->generateInt()/PHP_INT_MAX;
222 222
             /** @var ImmutableNumber $x */
223 223
             $x = $alpha->subtract($one->subtract($u)->divide($u)->ln(20)->divide($beta));
224 224
             /** @var ImmutableNumber $n */
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             }
230 230
 
231 231
             /** @var ImmutableNumber $v */
232
-            $v = $generator->generateInt() / PHP_INT_MAX;
232
+            $v = $generator->generateInt()/PHP_INT_MAX;
233 233
             /** @var ImmutableNumber $y */
234 234
             $y = $alpha->subtract($beta->multiply($x));
235 235
             /** @var ImmutableNumber $lhs */
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         do {
271 271
             $k = $k->add(1);
272 272
             /** @var ImmutableNumber $u */
273
-            $u = $randFactory->getMediumStrengthGenerator()->generateInt() / PHP_INT_MAX;
273
+            $u = $randFactory->getMediumStrengthGenerator()->generateInt()/PHP_INT_MAX;
274 274
             $p = $p->multiply($u);
275 275
         } while ($p->isGreaterThan($L));
276 276
 
Please login to merge, or discard this patch.