@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | private $cMySQL = null; |
11 | 11 | |
12 | - public function __construct(\jrdev\MySQL &$cMySQL, $tableName, $tableArgs = []) |
|
12 | + public function __construct(\jrdev\MySQL&$cMySQL, $tableName, $tableArgs = []) |
|
13 | 13 | { |
14 | 14 | $this->cMySQL = $cMySQL; |
15 | 15 | $this->tableName = $tableName; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function save($fields) |
49 | 49 | { |
50 | 50 | $result = false; |
51 | - $method = isset($fields[$this->pkName])? 'update' : 'insert'; |
|
51 | + $method = isset($fields[$this->pkName]) ? 'update' : 'insert'; |
|
52 | 52 | |
53 | 53 | if ($method === 'update') { |
54 | 54 | $updated = $this->update($fields, $fields[$this->pkName], 1); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $preparedFields[] = $this->escape($fieldValue, true); |
120 | 120 | } |
121 | 121 | |
122 | - $sql .= '(' .implode(',', $preparedFields) . ')'; |
|
122 | + $sql .= '(' . implode(',', $preparedFields) . ')'; |
|
123 | 123 | |
124 | 124 | if (false === $this->query($sql)) { |
125 | 125 | return false; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | $result = $this->real_escape_string($str); |
136 | 136 | |
137 | - return true === $quoted && preg_match('#^-?[0-9\.]+$#', $str) !== 1? "'{$result}'" : $result; |
|
137 | + return true === $quoted && preg_match('#^-?[0-9\.]+$#', $str) !== 1 ? "'{$result}'" : $result; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | private function parseWhere($where) |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | public function table($tableName, $tableArgs = []) |
290 | 290 | { |
291 | - if (! isset($this->tables[$tableName])) { |
|
291 | + if (!isset($this->tables[$tableName])) { |
|
292 | 292 | $this->tables[$tableName] = new MySQL_Table($this, $tableName, $tableArgs); |
293 | 293 | } |
294 | 294 |