Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | public function select($columns = "*") |
||
23 | { |
||
24 | if (!isset($this->table)) { |
||
25 | throw new LogicException("select() called before table()"); |
||
26 | } |
||
27 | |||
28 | if (!is_array($columns)) { |
||
29 | $columns = [$columns]; |
||
30 | } |
||
31 | |||
32 | $query = $this->factory()->newSelect(); |
||
33 | $query->from($this->table); |
||
34 | $query->cols($columns); |
||
35 | |||
36 | return $this->cloneWith("query", $query); |
||
37 | } |
||
38 | |||
52 |