Completed
Push — dev ( fccaa5...b7d069 )
by Jordan
9s
created
src/Samsara/Fermat/Provider/Distribution/Normal.php 1 patch
Unused Use Statements   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,16 +2,14 @@
 block discarded – undo
2 2
 
3 3
 namespace Samsara\Fermat\Provider\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\Distribution\Base\Distribution;
10
-use Samsara\Fermat\Provider\StatsProvider;
11
-use Samsara\Fermat\Types\Base\DecimalInterface;
12
-use Samsara\Fermat\Types\Base\NumberCollectionInterface;
13
-use Samsara\Fermat\Types\Base\NumberInterface;
14
-use Samsara\Fermat\Types\NumberCollection;
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\Distribution\Base\Distribution;
10
+use Samsara\Fermat\Provider\StatsProvider;
11
+use Samsara\Fermat\Types\Base\DecimalInterface;
12
+use Samsara\Fermat\Types\Base\NumberInterface;
15 13
 use Samsara\Fermat\Values\ImmutableNumber;
16 14
 
17 15
 class Normal extends Distribution
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/Distribution/Poisson.php 1 patch
Unused Use Statements   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 namespace Samsara\Fermat\Provider\Distribution;
4 4
 
5
-use RandomLib\Factory;
6
-use Samsara\Exceptions\SystemError\LogicalError\IncompatibleObjectState;
7
-use Samsara\Exceptions\UsageError\IntegrityConstraint;
8
-use Samsara\Exceptions\UsageError\OptionalExit;
9
-use Samsara\Fermat\Numbers;
10
-use Samsara\Fermat\Provider\Distribution\Base\Distribution;
11
-use Samsara\Fermat\Types\Base\DecimalInterface;
12
-use Samsara\Fermat\Types\Base\NumberInterface;
5
+use RandomLib\Factory;
6
+use Samsara\Exceptions\SystemError\LogicalError\IncompatibleObjectState;
7
+use Samsara\Exceptions\UsageError\IntegrityConstraint;
8
+use Samsara\Exceptions\UsageError\OptionalExit;
9
+use Samsara\Fermat\Numbers;
10
+use Samsara\Fermat\Provider\Distribution\Base\Distribution;
11
+use Samsara\Fermat\Types\Base\DecimalInterface;
12
+use Samsara\Fermat\Types\Base\NumberInterface;
13 13
 use Samsara\Fermat\Values\ImmutableNumber;
14 14
 
15 15
 class Poisson extends Distribution
Please login to merge, or discard this patch.
src/Samsara/Fermat/Collections.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         }
31 31
 
32 32
         if ($terms > 2) {
33
-            for ($n = 2;$n < $terms;$n++) {
33
+            for ($n = 2; $n < $terms; $n++) {
34 34
                 $kN = $k1->add($k2);
35 35
                 $collection->push($kN);
36 36
 
Please login to merge, or discard this patch.
src/Samsara/Fermat/Types/NumberCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function sort(): NumberCollectionInterface
118 118
     {
119
-        $this->getCollection()->sort(function($left, $right){
119
+        $this->getCollection()->sort(function($left, $right) {
120 120
             return ArithmeticProvider::compare($left, $right);
121 121
         });
122 122
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     public function getRandom(): NumberInterface
251 251
     {
252
-        $maxKey = $this->getCollection()->count() - 1;
252
+        $maxKey = $this->getCollection()->count()-1;
253 253
 
254 254
         try {
255 255
             $key = random_int(0, $maxKey);
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/Distribution/Base/Distribution.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
         return $sample;
26 26
     }
27 27
 
28
-     abstract public function rangeRandom($min = 0, $max = PHP_INT_MAX, int $maxIterations = 20): ImmutableNumber;
28
+        abstract public function rangeRandom($min = 0, $max = PHP_INT_MAX, int $maxIterations = 20): ImmutableNumber;
29 29
 
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $sample = new NumberCollection();
20 20
 
21
-        for ($i = 1;$i < $sampleSize;$i++) {
21
+        for ($i = 1; $i < $sampleSize; $i++) {
22 22
             $sample->push($this->random());
23 23
         }
24 24
 
Please login to merge, or discard this patch.