InvalidCheckoutException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php
2
namespace BPCI\SumUp\Exception;
3
4
use BPCI\SumUp\Checkout\CheckoutInterface;
5
use Throwable;
6
7
class InvalidCheckoutException extends \RuntimeException
8
{
9
    public function __construct(CheckoutInterface $checkout, $code = 10, Throwable $previous = null)
10
	{
11
		$message = sprintf(<<<MSG
12
		Something is wrong with this checkout:
13
		 checkout_reference: %s
14
		 amount: %s
15
		 pay_to_email: %s
16
MSG
17
            ,
18
            $checkout->getReference(),
19
            $checkout->getAmount(),
20
            $checkout->getPayToEmail()
21
        );
22
		parent::__construct($message, $code, $previous);
23
	}
24
}
25