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