| Conditions | 5 |
| Paths | 8 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 59 | public function run(): SchedulerInterface |
||
| 60 | { |
||
| 61 | $dateTime = new DateTime(); |
||
| 62 | |||
| 63 | foreach ($this->jobs as $job) { |
||
| 64 | $this->runningJobs[] = $job->run($dateTime); |
||
| 65 | } |
||
| 66 | |||
| 67 | while (count($this->runningJobs) !== 0) { |
||
| 68 | foreach ($this->runningJobs as $index => $runningJob) { |
||
| 69 | if ($runningJob->isRunning()) { |
||
| 70 | continue; |
||
| 71 | } |
||
| 72 | |||
| 73 | unset($this->runningJobs[$index]); |
||
| 74 | } |
||
| 75 | |||
| 76 | usleep(static::DELAY_INTERVAL); |
||
| 77 | } |
||
| 78 | |||
| 79 | return $this; |
||
| 80 | } |
||
| 90 |