Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | trait RetryableTrait |
||
7 | { |
||
8 | /** |
||
9 | * {@inheritdoc} |
||
10 | */ |
||
11 | public function getTtr() |
||
12 | { |
||
13 | return 60; |
||
14 | } |
||
15 | |||
16 | /** |
||
17 | * Gets maximum attempt times, default to 3. |
||
18 | * |
||
19 | * @return int maximum attempt times. |
||
20 | */ |
||
21 | public function getMaxAttemptTimes(): int |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function canRetry($attempt, $error) |
||
39 |