| Conditions | 5 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5.025 |
| 1 | <?php |
||
| 46 | 1 | public function parseArguments(ExecutorInterface $executor) : array |
|
| 47 | { |
||
| 48 | 1 | for ($i = $this->retries; $i >= 0; $i--) { |
|
| 49 | try { |
||
| 50 | 1 | return parent::parseArguments($executor); |
|
| 51 | 1 | } catch (\Throwable $thr) { |
|
| 52 | 1 | if (in_array(get_class($thr), $this->exceptions)) { |
|
| 53 | 1 | if ($i > 0) { |
|
| 54 | 1 | call_user_func($this->beforeRetry, $thr); |
|
| 55 | |||
| 56 | 1 | continue; |
|
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 60 | 1 | throw new $thr; |
|
| 61 | } |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 74 |