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