@@ -69,7 +69,7 @@ |
||
69 | 69 | public function __call($methodName, array $arguments = []) |
70 | 70 | { |
71 | 71 | if (!method_exists($this->driver, $methodName)) { |
72 | - throw new Exception('Method `' . $methodName . '` not defined in `' . get_class($this->driver) . '` driver.'); |
|
72 | + throw new Exception('Method `'.$methodName.'` not defined in `'.get_class($this->driver).'` driver.'); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | return call_user_func_array([$this->driver, $methodName], $arguments); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ); |
50 | 50 | } catch (\PDOException $e) { |
51 | 51 | if (!array_key_exists('ignoreFail', $config) || !$config['ignoreFail']) { |
52 | - throw new Exception('Connect to DB failed: ' . $e->getMessage()); |
|
52 | + throw new Exception('Connect to DB failed: '.$e->getMessage()); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public function createTable($name, array $elements = [], $params = '') |
148 | 148 | { |
149 | 149 | return $this->conn->exec( |
150 | - "CREATE TABLE IF NOT EXISTS `{$name}` (" . implode(',', $elements) . ") {$params};" |
|
150 | + "CREATE TABLE IF NOT EXISTS `{$name}` (".implode(',', $elements).") {$params};" |
|
151 | 151 | ); |
152 | 152 | } |
153 | 153 | |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | */ |
231 | 231 | public function insert($table, array $line = [], $multi = false) |
232 | 232 | { |
233 | - $fields = '`' . implode('`, `', array_keys($multi ? $line[0] : $line)) . '`'; |
|
234 | - $values = ':' . implode(', :', array_keys($multi ? $line[0] : $line)); |
|
233 | + $fields = '`'.implode('`, `', array_keys($multi ? $line[0] : $line)).'`'; |
|
234 | + $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line)); |
|
235 | 235 | |
236 | 236 | $id = null; |
237 | 237 | $dbh = null; |
@@ -266,12 +266,12 @@ discard block |
||
266 | 266 | |
267 | 267 | $valStr = []; |
268 | 268 | foreach ($keys as $key) { |
269 | - $valStr[] = '`' . $key . '` = :' . $key; |
|
269 | + $valStr[] = '`'.$key.'` = :'.$key; |
|
270 | 270 | } |
271 | 271 | $valStr = implode(',', $valStr); |
272 | 272 | |
273 | 273 | if ($conditions) { |
274 | - $conditions = 'WHERE ' . $conditions; |
|
274 | + $conditions = 'WHERE '.$conditions; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | return $this->conn->prepare( |
@@ -296,11 +296,11 @@ discard block |
||
296 | 296 | { |
297 | 297 | $keys = []; |
298 | 298 | foreach ($params AS $key => $val) { |
299 | - $keys[] = '`' . $table . '`.`' . $key . '`="' . $val . '"'; |
|
299 | + $keys[] = '`'.$table.'`.`'.$key.'`="'.$val.'"'; |
|
300 | 300 | } |
301 | 301 | |
302 | 302 | $sth = $this->conn->prepare( |
303 | - 'SELECT * FROM `' . $table . '` WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;' |
|
303 | + 'SELECT * FROM `'.$table.'` WHERE '.implode(' AND ', $keys).' LIMIT 1;' |
|
304 | 304 | ); |
305 | 305 | $sth->execute(); |
306 | 306 |
@@ -28,7 +28,6 @@ |
||
28 | 28 | * |
29 | 29 | * @access public |
30 | 30 | * |
31 | - * @param array $params configuration array |
|
32 | 31 | * |
33 | 32 | * @result void |
34 | 33 | */ |
@@ -259,7 +259,7 @@ |
||
259 | 259 | public function setBasicAuthentication($username, $password) |
260 | 260 | { |
261 | 261 | $this->setHttpAuth(static::AUTH_BASIC); |
262 | - $this->setopt(CURLOPT_USERPWD, $username . ':' . $password); |
|
262 | + $this->setopt(CURLOPT_USERPWD, $username.':'.$password); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |