Completed
Push — master ( fa5ac7...eb2a5f )
by Jan
06:08
created

PrivateKeyFileException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 24
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getPrivateKeyFile() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatEET\Cryptography;
4
5
class PrivateKeyFileException extends \Exception
6
{
7
8
	/**
9
	 * @var string
10
	 */
11
	private $privateKeyFile;
12
13 1
	public function __construct(string $privateKeyFile, \Throwable $previous = null)
14
	{
15 1
		parent::__construct(sprintf(
16 1
			'Private key could not be loaded from file \'%s\'. Please make sure that the file contains valid private key in PEM format.',
17
			$privateKeyFile
18 1
		), 0, $previous);
19
20 1
		$this->privateKeyFile = $privateKeyFile;
21 1
	}
22
23 1
	public function getPrivateKeyFile(): string
24
	{
25 1
		return $this->privateKeyFile;
26
	}
27
28
}
29