localHttpChallengeTestFailed()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Rogierw\RwAcme\Exceptions;
4
5
class DomainValidationException extends LetsEncryptClientException
6
{
7
    public static function localHttpChallengeTestFailed(string $domain, string $code): self
8
    {
9
        return new static(sprintf(
10
            'The local HTTP challenge test for %s received an invalid response with a %s status code.',
11
            $domain,
12
            $code
13
        ));
14
    }
15
16
    public static function localDnsChallengeTestFailed(string $domain): self
17
    {
18
        return new static(sprintf(
19
            "Couldn't fetch the correct DNS records for %s.",
20
            $domain
21
        ));
22
    }
23
}
24