| Conditions | 5 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 40 | public function invoke(): bool | ||
| 41 |     { | ||
| 42 |         while ($this->current_retry_count <= $this->max_retry or $this->max_retry === -1) { | ||
| 43 |             try { | ||
| 44 | $result = $this->chain->invoke(); | ||
| 45 | $this->current_retry_count = 0; | ||
| 46 | return $result; | ||
| 47 |             } catch (Exception $e) { | ||
| 48 |                 if (in_array(get_class($e), $this->exception_names, true)) { | ||
| 49 | $this->current_retry_count++; | ||
| 50 | continue; | ||
| 51 | } | ||
| 52 | throw $e; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | return false; | ||
| 56 | } | ||
| 58 |