| Conditions | 4 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 21 | public function column($column, bool $clearAll = false) |
||
| 22 | { |
||
| 23 | if (empty($column)) { |
||
| 24 | throw new QueryBuilderException('You must pass $column to column method!'); |
||
| 25 | } |
||
| 26 | |||
| 27 | if (!\is_array($column)) { |
||
| 28 | $column = [$column]; |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($clearAll == true) { |
||
|
|
|||
| 32 | $this->column = $column; |
||
| 33 | } else { |
||
| 34 | $this->column = \array_merge($this->column, $column); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $this; |
||
| 38 | } |
||
| 48 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.