Completed
Push — master ( 1ed802...c2e7e3 )
by Josef
02:51
created

InvalidPaymentException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRequest() 0 4 1
1
<?php
2
3
namespace SlevomatCsobGateway\Api;
4
5
use SlevomatCsobGateway\Call\ProcessPaymentRequest;
6
7
class InvalidPaymentException extends RequestException
8
{
9
10
	/** @var ProcessPaymentRequest */
11
	private $request;
12
13
	/**
14
	 * @param ProcessPaymentRequest $request
15
	 * @param Response $response
16
	 * @param string $payId
17
	 */
18
	public function __construct(ProcessPaymentRequest $request, Response $response, $payId)
19
	{
20
		parent::__construct(sprintf('PayId %s is invalid or expired.', $payId), $response);
21
		$this->request = $request;
22
	}
23
24
	/**
25
	 * @return ProcessPaymentRequest
26
	 */
27
	public function getRequest()
28
	{
29
		return $this->request;
30
	}
31
32
}
33