@@ -107,7 +107,7 @@ |
||
| 107 | 107 | public static function finder(IQuery $query = null, $single = false) |
| 108 | 108 | { |
| 109 | 109 | $query = ($query instanceof Query) ? $query : new Query((new ConnectionInjector)->build()); |
| 110 | - $query->table = static::$tableName . ' m'; |
|
| 110 | + $query->table = static::$tableName.' m'; |
|
| 111 | 111 | $query->objectName = get_called_class(); |
| 112 | 112 | $query->single = $single; |
| 113 | 113 | |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | $query->distinct = true; |
| 156 | 156 | $query->select = $this->db->getDriverType() == 'pgsql' ? '"role" AS "name"' : '`role` AS `name`'; |
| 157 | 157 | $query->table = $this->db->getDriverType() == 'pgsql' ? '"rbac_user"' : '`rbac_user`'; |
| 158 | - $query->addWhere(($this->db->getDriverType() == 'pgsql' ? '"user"=' : '`user`=') . $userId); |
|
| 158 | + $query->addWhere(($this->db->getDriverType() == 'pgsql' ? '"user"=' : '`user`=').$userId); |
|
| 159 | 159 | $query->single = false; |
| 160 | 160 | |
| 161 | 161 | return $query->run(\PDO::FETCH_ASSOC); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $sql = 'SHOW TABLES;'; |
| 142 | 142 | |
| 143 | 143 | if ($this->getDriverType() == 'pgsql') { |
| 144 | - $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \'' . $this->tableSchema . '\''; |
|
| 144 | + $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \''.$this->tableSchema.'\''; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $this->conn->query($sql)->fetchAll(\PDO::FETCH_COLUMN, 0); |
@@ -297,10 +297,10 @@ discard block |
||
| 297 | 297 | { |
| 298 | 298 | $keys = []; |
| 299 | 299 | foreach ($params AS $key => $val) { |
| 300 | - $keys[] = $table . '.' . $key . '=\'' . $val . '\''; |
|
| 300 | + $keys[] = $table.'.'.$key.'=\''.$val.'\''; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - $sth = $this->conn->prepare('SELECT * FROM ' . $table . ' WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;'); |
|
| 303 | + $sth = $this->conn->prepare('SELECT * FROM '.$table.' WHERE '.implode(' AND ', $keys).' LIMIT 1;'); |
|
| 304 | 304 | /** @noinspection PdoApiUsageInspection */ |
| 305 | 305 | $sth->execute(); |
| 306 | 306 | |
@@ -165,17 +165,17 @@ |
||
| 165 | 165 | |
| 166 | 166 | if ($this->db->getDriverType() === 'pgsql') { |
| 167 | 167 | if ($this->limit !== -1) { |
| 168 | - $query .= ' LIMIT ' . $this->limit . ' '; |
|
| 168 | + $query .= ' LIMIT '.$this->limit.' '; |
|
| 169 | 169 | } |
| 170 | 170 | if ($this->offset !== -1) { |
| 171 | - $query .= ' OFFSET ' . $this->offset . ' '; |
|
| 171 | + $query .= ' OFFSET '.$this->offset.' '; |
|
| 172 | 172 | } |
| 173 | 173 | } else { |
| 174 | 174 | if ($this->limit !== -1) { |
| 175 | 175 | $query .= ' LIMIT '; |
| 176 | 176 | |
| 177 | 177 | if ($this->offset !== -1) { |
| 178 | - $query .= $this->offset . ','; |
|
| 178 | + $query .= $this->offset.','; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | $query .= $this->limit; |