Country   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 58
ccs 0
cts 14
cp 0
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A add_issuer() 0 2 1
A get_issuers() 0 2 1
A get_name() 0 2 1
A set_name() 0 2 1
1
<?php
2
/**
3
 * Country.
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2021 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3;
12
13
/**
14
 * Title: Country
15
 * Description:
16
 * Copyright: 2005-2021 Pronamic
17
 * Company: Pronamic
18
 *
19
 * @author  Remco Tolsma
20
 * @version 2.0.0
21
 */
22
class Country {
23
	/**
24
	 * Country name.
25
	 *
26
	 * @var string
27
	 */
28
	private $name;
29
30
	/**
31
	 * Issuers for this country.
32
	 *
33
	 * @var array<int, Issuer>
34
	 */
35
	private $issuers;
36
37
	/**
38
	 * Constructs and initializes an country
39
	 */
40
	public function __construct() {
41
		$this->issuers = array();
42
	}
43
44
	/**
45
	 * Get the country name.
46
	 *
47
	 * @return string
48
	 */
49
	public function get_name() {
50
		return $this->name;
51
	}
52
53
	/**
54
	 * Set the country name.
55
	 *
56
	 * @param string $name Name.
57
	 * @return void
58
	 */
59
	public function set_name( $name ) {
60
		$this->name = $name;
61
	}
62
63
	/**
64
	 * Add issuer to this country.
65
	 *
66
	 * @param Issuer $issuer Issuer.
67
	 * @return void
68
	 */
69
	public function add_issuer( Issuer $issuer ) {
70
		$this->issuers[] = $issuer;
71
	}
72
73
	/**
74
	 * Get the issuers within this country.
75
	 *
76
	 * @return array<int, Issuer>
77
	 */
78
	public function get_issuers() {
79
		return $this->issuers;
80
	}
81
}
82