Passed
Pull Request — master (#141)
by Jordan
09:08
created
src/Samsara/Fermat/Core/Types/Base/Number.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
     /**
114 114
      * @return ImmutableDecimal|ImmutableFraction
115 115
      */
116
-    abstract public function asReal(): ImmutableDecimal|ImmutableFraction;
116
+    abstract public function asReal(): ImmutableDecimal | ImmutableFraction;
117 117
 
118 118
     /**
119 119
      * @return string
Please login to merge, or discard this patch.
src/Samsara/Fermat/Core/Types/Base/Interfaces/Numbers/NumberInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @return bool
72 72
      */
73
-    public function isEqual(NumberInterface|int|string|float $value): bool;
73
+    public function isEqual(NumberInterface | int | string | float $value): bool;
74 74
 
75 75
     /**
76 76
      * @return int|null
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * @return ImmutableDecimal|ImmutableFraction
92 92
      */
93
-    public function asReal(): ImmutableDecimal|ImmutableFraction;
93
+    public function asReal(): ImmutableDecimal | ImmutableFraction;
94 94
 
95 95
     /**
96 96
      * @return bool
Please login to merge, or discard this patch.
src/Samsara/Fermat/Core/Types/Traits/Arithmetic/ArithmeticScaleTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $scale = ($this->getScale() > $num->getScale()) ? $this->getScale() : $num->getScale();
69 69
         }
70 70
 
71
-        $scale = $scale + $this->numberOfLeadingZeros() + $num->numberOfLeadingZeros();
71
+        $scale = $scale+$this->numberOfLeadingZeros()+$num->numberOfLeadingZeros();
72 72
 
73 73
         return ArithmeticProvider::divide($this->getAsBaseTenRealNumber(), $num->getAsBaseTenRealNumber(), $scale+1);
74 74
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $scale = ($this->getScale() > $num->getScale()) ? $this->getScale() : $num->getScale();
86 86
 
87
-        $scale += $this->numberOfDecimalDigits() + $num->numberOfDecimalDigits();
87
+        $scale += $this->numberOfDecimalDigits()+$num->numberOfDecimalDigits();
88 88
 
89 89
         if ($this->isWhole() && $num->isPositive() && $num->isWhole() && $num->isLessThan(PHP_INT_MAX)) {
90 90
             return gmp_strval(gmp_pow($this->getAsBaseTenRealNumber(), $num->asInt()));
Please login to merge, or discard this patch.
src/Samsara/Fermat/Core/Types/Traits/Arithmetic/ArithmeticHelperTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      * @return ImmutableComplexNumber|ImmutableDecimal|ImmutableFraction
96 96
      * @throws IntegrityConstraint
97 97
      */
98
-    protected static function stringSelector(string $input): ImmutableComplexNumber|ImmutableDecimal|ImmutableFraction
98
+    protected static function stringSelector(string $input): ImmutableComplexNumber | ImmutableDecimal | ImmutableFraction
99 99
     {
100 100
 
101 101
         $input = trim($input);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         NumberInterface $thatRealPart,
181 181
         NumberInterface $thatImaginaryPart,
182 182
         CalcOperation $operation
183
-    ): static|ImmutableComplexNumber
183
+    ): static | ImmutableComplexNumber
184 184
     {
185 185
         $newRealPart = match($operation) {
186 186
             CalcOperation::Addition => $thisRealPart->add($thatRealPart),
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @throws IntegrityConstraint
212 212
      * @throws MissingPackage
213 213
      */
214
-    protected function helperAddSubFraction(ImmutableDecimal|ImmutableFraction $num, CalcOperation $operation): FractionInterface
214
+    protected function helperAddSubFraction(ImmutableDecimal | ImmutableFraction $num, CalcOperation $operation): FractionInterface
215 215
     {
216 216
         if ($num instanceof FractionInterface && $this->getDenominator()->isEqual($num->getDenominator())) {
217 217
             $finalDenominator = $this->getDenominator();
Please login to merge, or discard this patch.