@@ -113,7 +113,7 @@ |
||
| 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 |
@@ -70,7 +70,7 @@ discard block |
||
| 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 |
||
| 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 |
@@ -68,7 +68,7 @@ discard block |
||
| 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 |
||
| 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())); |
@@ -95,7 +95,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |