1 | <?php |
||
2 | /** |
||
3 | * Money transformer |
||
4 | * |
||
5 | * @author Pronamic <[email protected]> |
||
6 | * @copyright 2005-2021 Pronamic |
||
7 | * @license GPL-3.0-or-later |
||
8 | * @package Pronamic\WordPress\Pay\Gateways\OmniKassa2 |
||
9 | */ |
||
10 | |||
11 | namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2; |
||
12 | |||
13 | use Pronamic\WordPress\Money\Money as PronamicMoney; |
||
14 | |||
15 | /** |
||
16 | * Money transformer |
||
17 | * |
||
18 | * @author Remco Tolsma |
||
19 | * @version 2.1.8 |
||
20 | * @since 2.0.2 |
||
21 | */ |
||
22 | class MoneyTransformer { |
||
23 | /** |
||
24 | * Transform Pronamic money to OmniKassa 2.0 money. |
||
25 | * |
||
26 | * @param PronamicMoney $pronamic_money Pronamic money to convert. |
||
27 | * @return Money |
||
28 | * @throws \InvalidArgumentException Throws exception on invalid alphabetic currency code in given Pronamic money object. |
||
29 | */ |
||
30 | public static function transform( PronamicMoney $pronamic_money ) { |
||
31 | $money = new Money( |
||
32 | $pronamic_money->get_currency()->get_alphabetic_code(), |
||
33 | $pronamic_money->get_minor_units()->to_int() |
||
0 ignored issues
–
show
|
|||
34 | ); |
||
35 | |||
36 | return $money; |
||
37 | } |
||
38 | } |
||
39 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.