BaseResource::get_id()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
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