VerificationFailedException::getData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatCsobGateway\Crypto;
4
5
use RuntimeException;
6
use function sprintf;
7
8
class VerificationFailedException extends RuntimeException
9
{
10
11
	/** @var mixed[] */
12
	private $data;
13
14
	/** @var string */
15
	private $errorMessage;
16
17
	/**
18
	 * @param mixed[] $data
19
	 * @param string $errorMessage
20
	 */
21 1
	public function __construct(array $data, string $errorMessage)
22
	{
23 1
		parent::__construct(sprintf(
24 1
			'Verification failed: %s',
25 1
			$errorMessage
26
		));
27
28 1
		$this->data = $data;
29 1
		$this->errorMessage = $errorMessage;
30 1
	}
31
32
	/**
33
	 * @return mixed[]
34
	 */
35 1
	public function getData(): array
36
	{
37 1
		return $this->data;
38
	}
39
40 1
	public function getErrorMessage(): string
41
	{
42 1
		return $this->errorMessage;
43
	}
44
45
}
46