InvalidPaymentException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 4
rs 10
ccs 0
cts 3
cp 0
crap 2
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway\Api;
4
5
use SlevomatCsobGateway\Call\ProcessPaymentRequest;
6
use function sprintf;
7
8
class InvalidPaymentException extends RequestException
9
{
10
11
	/** @var ProcessPaymentRequest */
12
	private $request;
13
14
	public function __construct(ProcessPaymentRequest $request, Response $response, string $payId)
15
	{
16
		parent::__construct(sprintf('PayId %s is invalid or expired.', $payId), $response);
17
		$this->request = $request;
18
	}
19
20
	public function getRequest(): ProcessPaymentRequest
21
	{
22
		return $this->request;
23
	}
24
25
}
26