Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
FrmtrCurrency | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
createFormatter | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
5 | */ |
6 | |
7 | declare(strict_types=1); |
8 | |
9 | namespace pvc\frmtr\numeric; |
10 | |
11 | use NumberFormatter; |
12 | |
13 | /** |
14 | * Class FrmtrCurrency |
15 | */ |
16 | class FrmtrCurrency extends FrmtrNumber |
17 | { |
18 | #[\Override] |
19 | protected function createFormatter(): NumberFormatter |
20 | { |
21 | $formatter = new NumberFormatter((string)$this->getLocale(), NumberFormatter::CURRENCY); |
22 | $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, $this->getRoundingMode()); |
23 | return $formatter; |
24 | } |
25 | } |