@@ -33,8 +33,9 @@ |
||
| 33 | 33 | |
| 34 | 34 | $sql = "SELECT {$fields} FROM {$this->getTable()}";
|
| 35 | 35 | |
| 36 | - if (!empty($this->getTableAlias())) |
|
| 37 | - $sql .= " AS {$this->getTableAlias()}";
|
|
| 36 | + if (!empty($this->getTableAlias())) {
|
|
| 37 | + $sql .= " AS {$this->getTableAlias()}";
|
|
| 38 | + } |
|
| 38 | 39 | |
| 39 | 40 | $sql .= "{$add}";
|
| 40 | 41 | |
@@ -132,8 +132,9 @@ |
||
| 132 | 132 | */ |
| 133 | 133 | protected function setTable(string $tableName, string $tableAlias = ""): self |
| 134 | 134 | { |
| 135 | - if (!empty($tableAlias)) |
|
| 136 | - $this->tableAlias = $tableAlias; |
|
| 135 | + if (!empty($tableAlias)) {
|
|
| 136 | + $this->tableAlias = $tableAlias; |
|
| 137 | + } |
|
| 137 | 138 | $this->tableName = $tableName; |
| 138 | 139 | return $this; |
| 139 | 140 | } |
@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | {
|
| 48 | 48 | try {
|
| 49 | 49 | $query = "SELECT {$fields} FROM {$this->getTable()}";
|
| 50 | - if (!empty($this->getTableAlias())) |
|
| 51 | - $query .= " AS {$this->getTableAlias()}";
|
|
| 50 | + if (!empty($this->getTableAlias())) {
|
|
| 51 | + $query .= " AS {$this->getTableAlias()}";
|
|
| 52 | + } |
|
| 52 | 53 | $this->add($query, "main", $paramns); |
| 53 | 54 | return $this; |
| 54 | 55 | } catch (\PDOException $e) {
|
@@ -429,8 +430,9 @@ discard block |
||
| 429 | 430 | $this->sqlPartsSelect[$type] = $query; |
| 430 | 431 | } |
| 431 | 432 | |
| 432 | - if (!empty($params)) |
|
| 433 | - $this->params = array_merge($this->params, $params); |
|
| 433 | + if (!empty($params)) {
|
|
| 434 | + $this->params = array_merge($this->params, $params); |
|
| 435 | + } |
|
| 434 | 436 | } catch (\PDOException $e) {
|
| 435 | 437 | $this->setError($e); |
| 436 | 438 | } |