| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 92 | 6 | public function getResults() |
|
| 93 | { |
||
| 94 | 6 | if ($this->cachedPage !== null) { |
|
| 95 | 6 | return $this->cachedPage; |
|
| 96 | } |
||
| 97 | |||
| 98 | 6 | $offset = $this->getCurrentPage() * $this->getLimit() - $this->getLimit(); |
|
| 99 | |||
| 100 | 6 | return $this->cachedPage = $this->result->take($offset, $this->getLimit()); |
|
| 101 | } |
||
| 102 | } |
||
| 103 |