Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | 2 | public function __construct(string $request, string $detail, string $retryAfter = null) { |
|
11 | |||
12 | 2 | $message = "Invalid response received for request (" . $request . "): service unavailable - " . $detail; |
|
13 | |||
14 | 2 | if($retryAfter !== null) { |
|
15 | 1 | $message .= ' - may retry after: ' . $retryAfter; |
|
16 | } |
||
17 | |||
18 | 2 | parent::__construct($message); |
|
19 | |||
20 | 2 | $this->retryAfter = $retryAfter; |
|
21 | } |
||
35 | } |