InvalidPaymentException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequest() 0 3 1
A __construct() 0 4 1
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