Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 2 | public static function transform( Money $money ) { |
|
31 | 2 | $amount = new Amount( |
|
32 | 2 | $money->get_currency()->get_alphabetic_code(), |
|
33 | /** |
||
34 | * Make sure to send the right amount of decimals and omit the |
||
35 | * thousands separator. Non-string values are not accepted. |
||
36 | * |
||
37 | * @link https://docs.mollie.com/reference/v2/payments-api/create-payment |
||
38 | */ |
||
39 | 2 | $money->number_format( null, '.', '' ) |
|
40 | ); |
||
41 | |||
42 | 2 | return $amount; |
|
43 | } |
||
45 |