Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit a877389

Browse files
committed
Fixed PSR2 style
1 parent 40c9288 commit a877389

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Litipk/BigNumbers/Decimal.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public function pow(Decimal $b, $scale = null)
403403
} else {
404404
return NaN::getNaN();
405405
}
406-
} elseif($b->isZero()) {
406+
} elseif ($b->isZero()) {
407407
return Decimal::fromInteger(1, $scale);
408408
} elseif ($b->scale == 0) {
409409
$pow_scale = $scale === null ?
@@ -422,7 +422,12 @@ public function pow(Decimal $b, $scale = null)
422422
$remaining_b = bcsub($b->value, $truncated_b, $b->scale);
423423

424424
$first_pow_approx = bcpow($this->value, $truncated_b, $pow_scale+1);
425-
$intermediate_root = self::innerPowWithLittleExponent($this->value, $remaining_b, $b->scale, $pow_scale+1);
425+
$intermediate_root = self::innerPowWithLittleExponent(
426+
$this->value,
427+
$remaining_b,
428+
$b->scale,
429+
$pow_scale+1
430+
);
426431

427432
return Decimal::fromString(
428433
bcmul($first_pow_approx, $intermediate_root, $pow_scale+1),
@@ -717,7 +722,11 @@ private static function innerPowWithLittleExponent ($base, $exponent, $exp_scale
717722
$result_b = $result_a;
718723
$index_info = self::computeSquareIndex($exponent_remaining, $actual_index, $exp_scale, $inner_scale);
719724
$exponent_remaining = $index_info[1];
720-
$result_a = bcmul($result_a, self::compute2NRoot($base, $index_info[0], 2*($out_scale+1)), 2*($out_scale+1));
725+
$result_a = bcmul(
726+
$result_a,
727+
self::compute2NRoot($base, $index_info[0], 2*($out_scale+1)),
728+
2*($out_scale+1)
729+
);
721730
}
722731

723732
return self::innerRound($result_a, $out_scale);

0 commit comments

Comments
 (0)