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