InitPaymentResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCustomerCode() 0 3 1
A __construct() 0 15 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway\Call;
4
5
use DateTimeImmutable;
6
7
class InitPaymentResponse extends PaymentResponse
8
{
9
10
	/** @var string|null */
11
	private $customerCode;
12
13
	/**
14
	 * @param string $payId
15
	 * @param DateTimeImmutable $responseDateTime
16
	 * @param ResultCode $resultCode
17
	 * @param string $resultMessage
18
	 * @param PaymentStatus|null $paymentStatus
19
	 * @param string|null $authCode
20
	 * @param string|null $merchantData
21
	 * @param string|null $customerCode
22
	 * @param mixed[] $extensions
23
	 */
24 1
	public function __construct(
25
		string $payId,
26
		DateTimeImmutable $responseDateTime,
27
		ResultCode $resultCode,
28
		string $resultMessage,
29
		?PaymentStatus $paymentStatus,
30
		?string $authCode = null,
31
		?string $merchantData = null,
32
		?string $customerCode = null,
33
		array $extensions = []
34
	)
35
	{
36 1
		parent::__construct($payId, $responseDateTime, $resultCode, $resultMessage, $paymentStatus, $authCode, $merchantData, $extensions);
37
38 1
		$this->customerCode = $customerCode;
39 1
	}
40
41
	public function getCustomerCode(): ?string
42
	{
43
		return $this->customerCode;
44
	}
45
46
}
47