| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 66 | 21 | public function consume() |
|
| 67 | 21 | { |
|
| 68 | 21 | foreach ($this->untils as $id => $until) { |
|
| 69 | 4 | $diff = $until - microtime(true); |
|
| 70 | 4 | if ($diff > 0.0 || !isset($this->deferreds[$id])) { |
|
| 71 | 2 | continue; |
|
| 72 | } |
||
| 73 | 4 | $deferred = $this->deferreds[$id]; |
|
| 74 | 4 | unset($this->deferreds[$id], $this->untils[$id]); |
|
| 75 | 4 | $deferred->resolve(null); |
|
| 76 | } |
||
| 77 | 21 | } |
|
| 78 | |||
| 88 |