| Conditions | 3 |
| Paths | 3 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function process(): void |
||
| 34 | { |
||
| 35 | $remaining = $this->remaining; |
||
| 36 | |||
| 37 | // check for trivial case |
||
| 38 | if (count($remaining) === 0) { |
||
| 39 | $this->isComplete = true; |
||
| 40 | |||
| 41 | return; |
||
| 42 | } |
||
| 43 | |||
| 44 | $item = array_shift($remaining); |
||
| 45 | |||
| 46 | $this->processItem($item); |
||
| 47 | |||
| 48 | // update job progress |
||
| 49 | $this->remaining = $remaining; |
||
| 50 | $this->currentStep += 1; |
||
| 51 | |||
| 52 | // check for job completion |
||
| 53 | if (count($remaining) > 0) { |
||
| 54 | return; |
||
| 55 | } |
||
| 56 | |||
| 57 | $this->isComplete = true; |
||
| 58 | } |
||
| 59 | |||
| 65 |