Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | public function format(Collection $items): string |
||
46 | { |
||
47 | $formatter = new NumberFormatter( |
||
48 | $items->get($this->locale_key) ?? app()->getLocale(), |
||
|
|||
49 | $items->get($this->style_key) ?? NumberFormatter::DECIMAL, |
||
50 | $items->get($this->pattern_key) ?? null |
||
51 | ); |
||
52 | |||
53 | return $formatter->format( |
||
54 | (float) $items->get($this->number_key) ?? $this->default_number |
||
55 | ); |
||
58 |