wp-pay-gateways /
adyen
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Amount transformer |
||
| 4 | * |
||
| 5 | * @author Pronamic <[email protected]> |
||
| 6 | * @copyright 2005-2019 Pronamic |
||
| 7 | * @license GPL-3.0-or-later |
||
| 8 | * @package Pronamic\WordPress\Pay\Gateways\Adyen |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace Pronamic\WordPress\Pay\Gateways\Adyen; |
||
| 12 | |||
| 13 | use Pronamic\WordPress\Money\Money; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Amount transformer |
||
| 17 | * |
||
| 18 | * @author Reüel van der Steege |
||
| 19 | * @version 1.0.0 |
||
| 20 | * @since 1.0.0 |
||
| 21 | */ |
||
| 22 | class AmountTransformer { |
||
| 23 | /** |
||
| 24 | * Transform Pronamic money to Adyen amount. |
||
| 25 | * |
||
| 26 | * @param Money $money Pronamic money to convert. |
||
| 27 | * |
||
| 28 | * @return Amount |
||
| 29 | */ |
||
| 30 | public static function transform( Money $money ) { |
||
| 31 | $amount = new Amount( |
||
| 32 | strval( $money->get_currency()->get_alphabetic_code() ), |
||
| 33 | intval( $money->get_minor_units() ) |
||
|
0 ignored issues
–
show
|
|||
| 34 | ); |
||
| 35 | |||
| 36 | return $amount; |
||
| 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.