| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 34 | private function runProcessWithRetry(Process $process): void |
||
| 35 | { |
||
| 36 | for ($i = 0; $i < $this->numberOfRetries; ++$i) { |
||
| 37 | |||
| 38 | usleep($this->intervalDuration); |
||
| 39 | |||
| 40 | $process->run(); |
||
| 41 | |||
| 42 | if ($process->isSuccessful()) { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | if (!$process->isSuccessful()) { |
||
| 48 | throw new ProcessFailedException($process); |
||
| 49 | } |
||
| 52 |