Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
FrmtrInteger | |
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 FrmtrInteger |
15 | */ |
16 | class FrmtrInteger extends FrmtrNumber |
17 | { |
18 | /** |
19 | * @function createDefaultFormatter |
20 | * @return NumberFormatter |
21 | */ |
22 | #[\Override] |
23 | protected function createFormatter(): NumberFormatter |
24 | { |
25 | $formatter = parent::createFormatter(); |
26 | $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 0); |
27 | return $formatter; |
28 | } |
29 | } |