Failed Conditions
Push — develop ( 7a407a...ca12d6 )
by Remco
02:53
created

PaymentMethod::get_json()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Payment method
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2019 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\OmniKassa2
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Adyen;
12
13
/**
14
 * Payment method
15
 *
16
 * @author  Remco Tolsma
17
 * @version 2.1.0
18
 * @since   2.0.2
19
 */
20
class PaymentMethod {
21
	/**
22
	 * Type.
23
	 *
24
	 * @var string
25
	 */
26
	public $type;
27
28
	/**
29
	 * Construct a payment method.
30
	 *
31
	 * @param string $type Adyen payment method type.
32
	 */
33 1
	public function __construct( $type ) {
34 1
		$this->type = $type;
35 1
	}
36
37
	/**
38
	 * Get type.
39
	 *
40
	 * @return string
41
	 */
42 1
	public function get_type() {
43 1
		return $this->type;
44
	}
45
46
	/**
47
	 * Get JSON.
48
	 *
49
	 * @return object
50
	 */
51 1
	public function get_json() {
52 1
		return (object) (array) $this;
53
	}
54
}
55