Total Complexity | 8 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | final class FixedWaitTimeToRetry implements AvailabilityStrategy |
||
9 | { |
||
10 | private $storage; |
||
11 | private $maxFailures; |
||
12 | private $waitTime; |
||
13 | |||
14 | 5 | public function __construct(Storage $storage, int $maxFailures, int $waitTime) |
|
19 | 5 | } |
|
20 | |||
21 | 5 | public function isAvailable(string $serviceName): bool |
|
36 | } |
||
37 | } |
||
38 | |||
39 | 1 | public function getId(): string |
|
40 | { |
||
41 | 1 | return "fixed_time_to_retry"; |
|
42 | } |
||
43 | |||
44 | 3 | private function getLastTryTime(): int |
|
48 | } |
||
49 | } |
||
50 |