Error   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 33
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 2 1
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\PayNL;
4
5
/**
6
 * Title: Pay.nl error
7
 * Description:
8
 * Copyright: 2005-2021 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.0
13
 * @since   1.0.0
14
 */
15
class Error {
16
	/**
17
	 * Pay.nl error ID
18
	 *
19
	 * @var string
20
	 */
21
	private $id;
22
23
	/**
24
	 * Pay.nl error message
25
	 *
26
	 * @var string
27
	 */
28
	private $message;
29
30
	/**
31
	 * Constructs and initializes an Pay.nl error object
32
	 *
33
	 * @param string $id
34
	 * @param string $message
35
	 */
36 2
	public function __construct( $id, $message ) {
37 2
		$this->id      = $id;
38 2
		$this->message = $message;
39 2
	}
40
41
	/**
42
	 * Create an string representation of this object
43
	 *
44
	 * @return string
45
	 */
46 2
	public function __toString() {
47 2
		return $this->id . ' - ' . $this->message;
48
	}
49
}
50