| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | final class RetryOnExceptionMiddleware implements LoopMiddlewareInterface |
||
| 20 | { |
||
| 21 | private LoopMiddlewareInterface $chain; |
||
| 22 | /** @var array<int, class-string<Exception>> */ |
||
|
|
|||
| 23 | private array $exception_names; |
||
| 24 | private int $max_retry; |
||
| 25 | private int $current_retry_count = 0; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * RetryOnExceptionLoop constructor. |
||
| 29 | * @param int $max_retry |
||
| 30 | * @param array<int, class-string<Exception>> $exception_names |
||
| 31 | * @param LoopMiddlewareInterface $chain |
||
| 32 | */ |
||
| 33 | public function __construct(int $max_retry, array $exception_names, LoopMiddlewareInterface $chain) |
||
| 38 | } |
||
| 39 | |||
| 40 | public function invoke(): bool |
||
| 58 |