CertificateException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A failedToReadPkcs12() 0 3 1
A fileDoesNotExist() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\ApplePassbook\Build\Exception;
6
7
use Exception;
8
use LauLamanApps\ApplePassbook\Exception\PassbookException;
9
10
final class CertificateException extends Exception implements PassbookException
11
{
12
    public static function fileDoesNotExist(string $file): self
13
    {
14
        return new self(sprintf('Could not load certificate file \'%s\'.', $file));
15
    }
16
17
    public static function failedToReadPkcs12(string $file): self
18
    {
19
        return new self(sprintf('Unable to read the certificate store from PKCS#12 file \'%s\'.', $file));
20
    }
21
}
22