@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * @access public |
61 | 61 | * @param string $name |
62 | - * @param mixed $component |
|
62 | + * @param Dispatcher $component |
|
63 | 63 | * @return void |
64 | 64 | */ |
65 | 65 | public function addRequirement($name, $component) |
@@ -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 |