| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 4 | public function withRetryDelay(int $retryDelay): self |
|
| 31 | { |
||
| 32 | 4 | if ($retryDelay < 1) { |
|
| 33 | 1 | throw new InvalidArgumentException( |
|
| 34 | 1 | "Retry delay value must be a positive number greater than zero, \"$retryDelay\" is received.", |
|
| 35 | 1 | ); |
|
| 36 | } |
||
| 37 | |||
| 38 | 3 | $new = clone $this; |
|
| 39 | 3 | $new->retryDelay = $retryDelay; |
|
| 40 | 3 | return $new; |
|
| 41 | } |
||
| 57 |