InvalidPublicKeyException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatEET\Cryptography;
4
5
use Throwable;
6
7
class InvalidPublicKeyException extends PublicKeyFileException
8
{
9
10 1
	public function __construct(string $publicKeyFile, string $openSslError, ?Throwable $previous = null)
11
	{
12 1
		parent::__construct(sprintf(
13 1
			'Public key could not be loaded from file \'%s\'. Please make sure that the file contains valid public key in PEM format. (OpenSSL error: %s)',
14
			$publicKeyFile,
15
			$openSslError
16
		), $publicKeyFile, $previous);
17 1
	}
18
19
}
20