| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 10 | class ExponentialBackoff implements TimeoutStrategyHandler |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var RequestsManager |
||
| 14 | */ |
||
| 15 | private $manager; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Start integer value in microseconds |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | private $expMinDelayMicroSeconds = 500000; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Max integer value in microseconds |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | private $expMaxDelayMicroSeconds; |
||
| 28 | |||
| 29 | private $expFactor = 2.71828; |
||
| 30 | private $expJitter = 0.1; |
||
| 31 | |||
| 32 | public function __construct(RequestsManager $manager, $maxDelay = 60000000) |
||
| 36 | } |
||
| 37 | |||
| 38 | public function handleTimeout() |
||
| 57 |