Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class IpCannotBeLocatedException extends RuntimeException |
||
10 | { |
||
11 | private bool $isNonLocatableAddress = true; |
||
12 | |||
13 | 3 | public static function forEmptyAddress(): self |
|
14 | { |
||
15 | 3 | return new self('Ignored visit with no IP address'); |
|
16 | } |
||
17 | |||
18 | 2 | public static function forLocalhost(): self |
|
21 | } |
||
22 | |||
23 | 7 | public static function forError(Throwable $e): self |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * Tells if this error belongs to an address that will never be possible locate |
||
33 | */ |
||
34 | 11 | public function isNonLocatableAddress(): bool |
|
39 |