Completed
Push — master ( 2683bd...cf87f7 )
by Jordan
21s queued 13s
created
Samsara/Fermat/Provider/RoundingModeAdapters/Modes/StochasticAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $remainder = substr($remainder, 0, 3);
27 27
             $target = (int)($digit.$remainder);
28 28
             $rangeMin = 0;
29
-            $rangeMax = (int)str_repeat('9', strlen($remainder) + 1);
29
+            $rangeMax = (int)str_repeat('9', strlen($remainder)+1);
30 30
         }
31 31
 
32 32
         $random = RandomProvider::randomInt($rangeMin, $rangeMax, RandomMode::Speed)->asInt();
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/RoundingModeAdapters/Modes/HalfOddAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $remainder = $this->remainderCheck();
18 18
 
19 19
         if ($early == 0) {
20
-            return ($nextDigit % 2 == 1 && !$remainder) ? 0 : 1;
20
+            return ($nextDigit%2 == 1 && !$remainder) ? 0 : 1;
21 21
         } else {
22 22
             return $early == 1 ? 1 : 0;
23 23
         }
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/RoundingModeAdapters/Modes/HalfEvenAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $remainder = $this->remainderCheck();
18 18
 
19 19
         if ($early == 0) {
20
-            return ($nextDigit % 2 == 0 && !$remainder) ? 0 : 1;
20
+            return ($nextDigit%2 == 0 && !$remainder) ? 0 : 1;
21 21
         } else {
22 22
             return $early == 1 ? 1 : 0;
23 23
         }
Please login to merge, or discard this patch.
src/Samsara/Fermat/Provider/RoundingProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $roundedPartString = $currentPart ? $decimalPart : $wholePart;
133 133
         $otherPart = $currentPart ? str_split($wholePart) : str_split($decimalPart);
134 134
         $baseLength = $currentPart ? strlen($decimalPart)-1 : strlen($wholePart);
135
-        $pos = $currentPart ? $places : $baseLength + $places;
135
+        $pos = $currentPart ? $places : $baseLength+$places;
136 136
 
137 137
         if ($currentPart) {
138 138
             $pos = ($absPlaces > $baseLength && $places < 0) ? $baseLength : $pos;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         bool $currentPart
212 212
     ): array
213 213
     {
214
-        $digit = (int)$roundedPart[$pos] + $carry;
214
+        $digit = (int)$roundedPart[$pos]+$carry;
215 215
 
216 216
         if ($carry == 0 && $digit == 5 && strlen($roundedPartString) > $pos+1) {
217 217
             $remainder = substr($roundedPartString, $pos+1);
Please login to merge, or discard this patch.