Total Complexity | 10 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class MoneyBuilder |
||
13 | { |
||
14 | public static function buildMoney(string $price, string $currency): ?Money |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | public static function calculatePriceMultiplier(string $price): int |
||
32 | { |
||
33 | $price = self::divide($price); |
||
34 | if (!is_array($price)) { |
||
35 | return 1; |
||
36 | } |
||
37 | return (int) (1 . implode(array_fill(0, strlen($price[1]),0))); |
||
38 | } |
||
39 | |||
40 | private static function divide(string $number): array | string |
||
46 | } |
||
47 | |||
48 | private static function checkFloat(string $number): bool |
||
51 | } |
||
52 | } |
||
53 |