Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | public function orderBy($order) |
||
22 | { |
||
23 | if (!isset($this->query)) { |
||
24 | throw new LogicException("orderBy() called before select()"); |
||
25 | } |
||
26 | |||
27 | if (!is_array($order)) { |
||
28 | $order = [$order]; |
||
29 | } |
||
30 | |||
31 | $query = clone $this->query; |
||
32 | $query->orderBy($order); |
||
33 | |||
34 | return $this->cloneWith("query", $query); |
||
35 | } |
||
36 | |||
45 |