Price   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 7 1
1
<?php
2
3
namespace IproSync\Ipro;
4
5
class Price
6
{
7 1
    public static function format(float $amount, ?string $currency = null): string
8
    {
9 1
        return $currency.number_format(
10 1
            $amount,
11 1
            (int) config('iprosoftware-sync.number_format.decimals'),
12 1
            config('iprosoftware-sync.number_format.decimal_separator'),
13 1
            config('iprosoftware-sync.number_format.thousands_separator'),
14 1
        );
15
    }
16
}
17