| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | final class CurrencyFormatter implements Formatter, Localizable |
||
| 17 | { |
||
| 18 | public const DEFAULT_CURRENCY_SYMBOL = '¤'; |
||
| 19 | |||
| 20 | public function __construct( |
||
| 21 | private readonly NumberFormatter $number_formatter, |
||
| 22 | ) { |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Formats a number with the specified pattern. |
||
| 27 | * |
||
| 28 | * @param float|int|numeric-string $number |
||
|
|
|||
| 29 | * The number to format. |
||
| 30 | * @param string|NumberPattern $pattern |
||
| 31 | * The pattern used to format the number. |
||
| 32 | */ |
||
| 33 | public function format( |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function localized(Locale $locale): CurrencyFormatterLocalized |
||
| 49 | } |
||
| 50 | } |
||
| 51 |