@@ -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 | } |
@@ -49,8 +49,9 @@ discard block |
||
| 49 | 49 | {
|
| 50 | 50 | try {
|
| 51 | 51 | $query = "SELECT {$fields} FROM {$this->getTable()}";
|
| 52 | - if (!empty($this->getTableAlias())) |
|
| 53 | - $query .= " AS {$this->getTableAlias()}";
|
|
| 52 | + if (!empty($this->getTableAlias())) {
|
|
| 53 | + $query .= " AS {$this->getTableAlias()}";
|
|
| 54 | + } |
|
| 54 | 55 | $this->add($query, "main", $paramns); |
| 55 | 56 | return $this; |
| 56 | 57 | } catch (\PDOException $e) {
|
@@ -404,8 +405,9 @@ discard block |
||
| 404 | 405 | $this->sqlPartsSelect[$type] = $query; |
| 405 | 406 | } |
| 406 | 407 | |
| 407 | - if (!empty($params)) |
|
| 408 | - $this->setParameter($params); |
|
| 408 | + if (!empty($params)) {
|
|
| 409 | + $this->setParameter($params); |
|
| 410 | + } |
|
| 409 | 411 | } catch (\PDOException $e) {
|
| 410 | 412 | $this->setError($e); |
| 411 | 413 | } |