Failed Conditions
Push — develop ( 79532f...94eaa0 )
by Remco
03:25
created

ResponseObject   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 33
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_json() 0 2 1
A set_original_object() 0 2 1
A get_original_object() 0 2 1
1
<?php
2
/**
3
 * Response
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2019 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\Adyen
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Adyen;
12
13
use Pronamic\WordPress\Pay\Core\Statuses as Core_Statuses;
14
15
/**
16
 * Response object
17
 *
18
 * @author  Remco Tolsma
19
 * @version 1.0.0
20
 * @since   1.0.0
21
 */
22
abstract class ResponseObject {
23
	/**
24
	 * Originale response object.
25
	 *
26
	 * @var object|null
27
	 */
28
	private $original_object;
29
30
	/**
31
	 * Get original object.
32
	 *
33
	 * @return object|null
34
	 */
35 1
	public function get_original_object() {
36 1
		return $this->original_object;
37
	}
38
39
	/**
40
	 * Set original object.
41
	 *
42
	 * @param object|null $object Object.
43
	 */
44 4
	public function set_original_object( $object ) {
45 4
		$this->original_object = $object;
46 4
	}
47
48
	/**
49
	 * Get JSON.
50
	 *
51
	 * @return object|null
52
	 */
53 1
	public function get_json() {
54 1
		return $this->get_original_object();
55
	}
56
}
57