| Conditions | 4 |
| Paths | 7 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | protected function logic($offset, $limit, $nowCount) |
||
| 53 | { |
||
| 54 | try { |
||
| 55 | while ($offsetResult = Offset::logic($offset, $limit, $nowCount)) { |
||
| 56 | $result = $this->source->execute($offsetResult->getPage(), $offsetResult->getSize()); |
||
| 57 | if ($result->getTotalCount() === 0) { |
||
| 58 | return; |
||
| 59 | } |
||
| 60 | $nowCount += $result->getTotalCount(); |
||
| 61 | yield $result; |
||
| 62 | } |
||
| 63 | } catch (AlreadyGetNeededCountException $exception) { |
||
| 64 | return; |
||
| 65 | } |
||
| 66 | } |
||
| 67 | } |
||
| 68 |