GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 81a457...ca7640 )
by Daniel
03:05
created

InvalidUrl   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 70%

Importance

Changes 0
Metric Value
dl 0
loc 26
ccs 7
cts 10
cp 0.7
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A couldNotValidate() 0 6 1
A couldNotDetermineHost() 0 6 1
A couldNotResolveDns() 0 7 1
1
<?php
2
3
namespace LiquidWeb\SslCertificate\Exceptions;
4
5
use Exception;
6
7
class InvalidUrl extends Exception
8
{
9
    use TrackDomainTrait;
10
11 1
    public static function couldNotValidate(string $url): InvalidUrl
12
    {
13 1
        $exception = new static("String `{$url}` is not a valid url.");
14
15 1
        return $exception;
16
    }
17
18
    public static function couldNotDetermineHost(string $url): InvalidUrl
19
    {
20
        $exception = new static("Could not determine host from url `{$url}`.");
21
22
        return $exception;
23
    }
24
25 3
    public static function couldNotResolveDns(string $hostName): InvalidUrl
26
    {
27 3
        $exception = new static("The domain `{$hostName}` does not have a valid DNS record.");
28 3
        $exception->setErrorDomain($hostName);
29
30 3
        return $exception;
31
    }
32
}
33