| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 56 | public function count() |
||
| 57 | { |
||
| 58 | // Avoid using EagerCursor::count as this stores a collection without limits to memory |
||
| 59 | if ($this->cursor->getBaseCursor() instanceof EagerCursor) { |
||
| 60 | return $this->cursor->getBaseCursor()->getCursor()->count(); |
||
| 61 | } |
||
| 62 | |||
| 63 | return $this->cursor->count(); |
||
| 64 | } |
||
| 65 | } |
||
| 66 |