@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | public function sort(): NumberCollectionInterface |
| 120 | 120 | { |
| 121 | - $this->getCollection()->sort(function($left, $right){ |
|
| 121 | + $this->getCollection()->sort(function($left, $right) { |
|
| 122 | 122 | return ArithmeticProvider::compare($left, $right); |
| 123 | 123 | }); |
| 124 | 124 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | public function getRandom(): NumberInterface |
| 253 | 253 | { |
| 254 | - $maxKey = $this->getCollection()->count() - 1; |
|
| 254 | + $maxKey = $this->getCollection()->count()-1; |
|
| 255 | 255 | |
| 256 | 256 | $key = PolyfillProvider::randomInt(0, $maxKey); |
| 257 | 257 | |
@@ -199,16 +199,16 @@ |
||
| 199 | 199 | * @var ImmutableNumber $value1 |
| 200 | 200 | */ |
| 201 | 201 | foreach ($largerGroup as $key1 => $value1) { |
| 202 | - $largerKey = $largerExp - $key1; |
|
| 202 | + $largerKey = $largerExp-$key1; |
|
| 203 | 203 | |
| 204 | 204 | /** |
| 205 | 205 | * @var int $key2 |
| 206 | 206 | * @var ImmutableNumber $value2 |
| 207 | 207 | */ |
| 208 | 208 | foreach ($smallerGroup as $key2 => $value2) { |
| 209 | - $smallerKey = $smallerExp - $key2; |
|
| 209 | + $smallerKey = $smallerExp-$key2; |
|
| 210 | 210 | $newVal = $value1->multiply($value2); |
| 211 | - $newExp = $largerKey + $smallerKey; |
|
| 211 | + $newExp = $largerKey+$smallerKey; |
|
| 212 | 212 | |
| 213 | 213 | if (isset($finalCoefs[$newExp])) { |
| 214 | 214 | $finalCoefs[$newExp] = $finalCoefs[$newExp]->add($newVal); |