Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
28 | 4 | public static function failedHandshake(Url $url): CouldNotDownloadCertificate |
|
29 | { |
||
30 | 4 | if ($url->getPort() === '80') { |
|
31 | 1 | return new static('Server does not support SSL over port 80.'); |
|
32 | } |
||
33 | 3 | $exception = new static("Server SSL handshake error – the certificate for `{$url->getTestURL()}` will not work."); |
|
34 | 3 | $exception->setErrorDomain($url->getHostName()); |
|
35 | |||
36 | 3 | return $exception; |
|
37 | } |
||
38 | |||
55 |