Completed
Push — master ( 70be8d...b5e6ba )
by Jan
05:24
created

InvalidPublicKeyException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php declare(strict_types = 1);
2
3
namespace SlevomatEET\Cryptography;
4
5
use Throwable;
6
7
class InvalidPublicKeyException extends PublicKeyFileException
8
{
9
10
	public function __construct(string $publicKeyFile, string $openSslError, ?Throwable $previous = null)
11
	{
12
		parent::__construct(sprintf(
13
			'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
	}
18
19
}
20