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