| Total Complexity | 15 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Select extends AbstractQuery |
||
| 6 | { |
||
| 7 | public ?string $where; |
||
| 8 | public ?string $having; |
||
| 9 | public ?string $limit; |
||
| 10 | public ?string $order; |
||
| 11 | public string $expression = '*'; |
||
| 12 | public bool $calcFoundRows = false; |
||
| 13 | |||
| 14 | 17 | public function expression(string $expression): Select |
|
| 15 | { |
||
| 16 | 17 | $this->expression = $expression; |
|
| 17 | 17 | return $this; |
|
| 18 | } |
||
| 19 | |||
| 20 | 68 | public function where(string $where): Select |
|
| 21 | { |
||
| 22 | 68 | $this->where = $where; |
|
| 23 | 68 | return $this; |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public function having(string $having): Select |
|
| 27 | { |
||
| 28 | 1 | $this->having = $having; |
|
| 29 | 1 | return $this; |
|
| 30 | } |
||
| 31 | |||
| 32 | 67 | public function limit(string $limit): Select |
|
| 33 | { |
||
| 34 | 67 | if (!empty($limit)) { |
|
| 35 | 67 | $this->limit = $limit; |
|
| 36 | } |
||
| 37 | 67 | return $this; |
|
| 38 | } |
||
| 39 | |||
| 40 | 68 | public function order(string $order): Select |
|
| 46 | } |
||
| 47 | |||
| 48 | 13 | public function calcFoundRows(): Select |
|
| 49 | { |
||
| 52 | } |
||
| 53 | |||
| 54 | 78 | public function __toString(): string |
|
| 72 |