| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function filter(\Traversable $documents): \Generator |
||
| 35 | { |
||
| 36 | $count = 0; |
||
| 37 | |||
| 38 | foreach ($documents as $id => $doc) { |
||
| 39 | $count++; |
||
| 40 | |||
| 41 | if ($count <= $this->offset) { |
||
| 42 | continue; |
||
| 43 | } |
||
| 44 | |||
| 45 | if ($count > $this->count + $this->offset) { |
||
| 46 | break; |
||
| 47 | } |
||
| 48 | |||
| 49 | yield $id => $doc; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |