| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0117 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | 1 | public function limit($limit, $offset = 0) |
|
| 23 | { |
||
| 24 | 1 | if (!isset($this->query)) { |
|
| 25 | throw new LogicException("limit() called before select()"); |
||
| 26 | } |
||
| 27 | |||
| 28 | 1 | $query = clone $this->query; |
|
| 29 | 1 | $query->limit($limit); |
|
| 30 | 1 | $query->offset($offset); |
|
| 31 | |||
| 32 | 1 | return $this->cloneWith("query", $query); |
|
| 33 | } |
||
| 34 | |||
| 43 |