PaymentMeanBrandList   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 33
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A add_payment_mean_brand() 0 2 1
A __toString() 0 2 1
A __construct() 0 2 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\OmniKassa;
4
5
/**
6
 * Title: OmniKassa payment mean brand list
7
 * Description:
8
 * Copyright: 2005-2020 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.3
13
 * @since   1.1.0
14
 */
15
class PaymentMeanBrandList {
16
	/**
17
	 * List
18
	 *
19
	 * @var array
20
	 */
21
	private $list;
22
23
	/**
24
	 * Constructs and initialize a payment methods list
25
	 *
26
	 * @parm array $list
27
	 */
28 2
	public function __construct( array $list = array() ) {
29 2
		$this->list = $list;
30 2
	}
31
32
	/**
33
	 * Add payment method
34
	 *
35
	 * @param string $payment_mean_brand
36
	 */
37 1
	public function add_payment_mean_brand( $payment_mean_brand ) {
38 1
		$this->list[] = $payment_mean_brand;
39 1
	}
40
41
	/**
42
	 * Create a string representation of this payment mean brand list
43
	 *
44
	 * @return string
45
	 */
46 2
	public function __toString() {
47 2
		return implode( ', ', $this->list );
48
	}
49
}
50