src/Money.php
public function formatWith(\NumberFormatter $formatter) : string
    {
        return $formatter->formatCurrency(
            $this->amount->toFloat(),
            $this->currency->getCurrencyCode()
        );
    }
public function formatWith(\NumberFormatter $formatter) : string
    {
        return $formatter->formatCurrency(
            $this->amount->toFloat(),
            $this->currency->getCurrencyCode()
        );
    }
public function formatWith ( \ NumberFormatter $ formatter ) : string { return $ formatter -> formatCurrency ( $ this -> amount -> toFloat ( ) , $ this -> currency -> getCurrencyCode ( ) ) ; }
Formats this Money with the given NumberFormatter.

Note that NumberFormatter internally represents values using floating point arithmetic,
so discrepancies can appear when formatting very large monetary values.

@param \NumberFormatter $formatter The formatter to format with.

@return string
Formats this Money with the given NumberFormatter .