RequestHeader   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A jsonSerialize() 0 3 1
1
<?php
2
/**
3
 * Request Header
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2022 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\Payvision
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Payvision;
12
13
/**
14
 * Request Header
15
 *
16
 * @author  Remco Tolsma
17
 * @version 1.1.0
18
 * @since   1.0.0
19
 */
20
class RequestHeader implements \JsonSerializable {
21
	/**
22
	 * Business ID.
23
	 *
24
	 * @var string
25
	 */
26
	private $business_id;
27
28
	/**
29
	 * Construct and initialize request header.
30
	 *
31
	 * @param string $business_id Business ID.
32
	 */
33 3
	public function __construct( $business_id ) {
34 3
		$this->business_id = $business_id;
35 3
	}
36
37
	/**
38
	 * JSON serialize.
39
	 *
40
	 * @return object
41
	 */
42 2
	public function jsonSerialize() {
43
		return (object) array(
44 2
			'businessId' => $this->business_id,
45
		);
46
	}
47
}
48