BaseResource   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 5
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_id() 0 2 1
A __construct() 0 2 1
1
<?php
2
/**
3
 * Base Resource
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2022 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\Mollie
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Mollie;
12
13
/**
14
 * Base Resource
15
 *
16
 * @link https://github.com/mollie/mollie-api-php/blob/v2.25.0/src/Resources/BaseResource.php
17
 * @author  Remco Tolsma
18
 * @version 2.1.0
19
 * @since   2.1.0
20
 */
21
abstract class BaseResource {
22
	/**
23
	 * The resource unique identifier.
24
	 *
25
	 * @var string
26
	 */
27
	private $id;
28
29
	/**
30
	 * Construct base resource.
31
	 *
32
	 * @param string $id Identifier.
33
	 */
34
	public function __construct( $id ) {
35
		$this->id = $id;
36
	}
37
38
	/**
39
	 * Get identifier.
40
	 *
41
	 * @return string
42
	 */
43
	public function get_id() {
44
		return $this->id;
45
	}
46
}
47