| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | final class TimeoutException extends RuntimeException implements NetworkExceptionInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var RequestInterface |
||
| 20 | */ |
||
| 21 | private $request; |
||
| 22 | |||
| 23 | public static function ofRequest(RequestInterface $request): self |
||
| 24 | { |
||
| 25 | $self = new self( |
||
| 26 | "Got a timeout while waiting for the server's response", |
||
| 27 | StatusCodeInterface::STATUS_REQUEST_TIMEOUT |
||
| 28 | ); |
||
| 29 | $self->request = $request; |
||
| 30 | return $self; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getRequest(): RequestInterface |
||
| 36 | } |
||
| 37 | } |
||
| 38 |