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