/** * {@inheritdoc} */ public function applyTo(BigNumber $amount, Currency $currency, $currentScale) { return $amount->toScale($currency->getDefaultFractionDigits(), $this->roundingMode); }
/** * Returns a copy of this Money with this value, and the default number of fraction digits of the currency in use. * * @param int $roudingMode The rounding mode to apply, if necessary. * * @return Money */ public function withDefaultFractionDigits($roudingMode = RoundingMode::UNNECESSARY) { return $this->withFractionDigits($this->currency->getDefaultFractionDigits(), $roudingMode); }