Methods   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 52
ccs 0
cts 6
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 6 2
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Nocks;
4
5
use Pronamic\WordPress\Pay\Core\PaymentMethods;
6
7
/**
8
 * Title: Nocks payment methods
9
 * Description:
10
 * Copyright: 2005-2020 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author  Reüel van der Steege
14
 * @version 2.0.0
15
 * @since   1.0.0
16
 */
17
class Methods {
18
	/**
19
	 * Constant for the Bancontact method.
20
	 *
21
	 * @var string
22
	 */
23
	const BANCONTACT = 'bancontact';
24
25
	/**
26
	 * Constant for the Giropay method.
27
	 *
28
	 * @var string
29
	 */
30
	const GIROPAY = 'giropay';
31
32
	/**
33
	 * Constant for the Gulden payment method.
34
	 *
35
	 * @var string
36
	 */
37
	const GULDEN = 'gulden';
38
39
	/**
40
	 * Constant for the iDEAL payment method.
41
	 *
42
	 * @var string
43
	 */
44
	const IDEAL = 'ideal';
45
46
	/**
47
	 * Constant for the SEPA payment method.
48
	 *
49
	 * @var string
50
	 */
51
	const SEPA = 'sepa';
52
53
	/**
54
	 * Transform WordPress payment method to Nocks method.
55
	 * Nocks only offers Gulden payment method to merchants.
56
	 *
57
	 * @since 1.0.0
58
	 *
59
	 * @param string $payment_method WordPress Pay payment method.
60
	 *
61
	 * @return string
62
	 */
63
	public static function transform( $payment_method ) {
64
		switch ( $payment_method ) {
65
			case PaymentMethods::GULDEN:
66
				return self::GULDEN;
67
			default:
68
				return null;
69
		}
70
	}
71
}
72