Completed
Push — master ( ad7ee3...c08a34 )
by Rogier
29s queued 12s
created

localDnsChallengeTestFailed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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