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
wmc 2
eloc 6
dl 0
loc 33
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 2 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * Error
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2022 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Payments
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Sisow;
12
13
/**
14
 * Title: Sisow error
15
 * Description:
16
 * Copyright: 2005-2022 Pronamic
17
 * Company: Pronamic
18
 *
19
 * @author  Remco Tolsma
20
 * @version 2.0.0
21
 * @since   1.0.0
22
 */
23
class Error {
24
	/**
25
	 * Sisow error code.
26
	 *
27
	 * @var string
28
	 */
29
	public $code;
30
31
	/**
32
	 * Sisow error message.
33
	 *
34
	 * @var string
35
	 */
36
	public $message;
37
38
	/**
39
	 * Constructs and initializes an Sisow error object.
40
	 *
41
	 * @param string $code    Code.
42
	 * @param string $message Message.
43
	 */
44 1
	public function __construct( $code, $message ) {
45 1
		$this->code    = $code;
46 1
		$this->message = $message;
47 1
	}
48
49
	/**
50
	 * Create an string representation of this object.
51
	 *
52
	 * @return string
53
	 */
54 1
	public function __toString() {
55 1
		return $this->code . ' ' . $this->message;
56
	}
57
}
58