@@ -99,10 +99,10 @@ |
||
99 | 99 | case "double": |
100 | 100 | return sprintf('%F', $parameter); |
101 | 101 | case "string": |
102 | - return "'" . addcslashes($parameter, "'") . "'"; |
|
102 | + return "'".addcslashes($parameter, "'")."'"; |
|
103 | 103 | case 'object': |
104 | 104 | if (method_exists($parameter, '__toString')) { |
105 | - return "'" . addcslashes((string)$parameter, "'") . "'"; |
|
105 | + return "'".addcslashes((string)$parameter, "'")."'"; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $key = md5(serialize([$query, $parameters, $this->name, $this->prefix])); |
263 | 263 | } |
264 | 264 | |
265 | - $data = $store->remember($key, $lifetime, function () use ($query, $parameters) { |
|
265 | + $data = $store->remember($key, $lifetime, function() use ($query, $parameters) { |
|
266 | 266 | return $this->query($query, $parameters)->fetchAll(); |
267 | 267 | }); |
268 | 268 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | */ |
379 | 379 | public function hasTable($name) |
380 | 380 | { |
381 | - return $this->driver->hasTable($this->prefix . $name); |
|
381 | + return $this->driver->hasTable($this->prefix.$name); |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | /** |
@@ -164,7 +164,7 @@ |
||
164 | 164 | */ |
165 | 165 | public function setName($name) |
166 | 166 | { |
167 | - parent::setName($this->prefix . $name); |
|
167 | + parent::setName($this->prefix.$name); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | if (!empty($table->getPrimaryKeys())) { |
270 | 270 | $primaryKeys = array_map([$this, 'quote'], $table->getPrimaryKeys()); |
271 | 271 | |
272 | - $innerStatement[] = 'PRIMARY KEY (' . join(', ', $primaryKeys) . ')'; |
|
272 | + $innerStatement[] = 'PRIMARY KEY ('.join(', ', $primaryKeys).')'; |
|
273 | 273 | } |
274 | 274 | |
275 | 275 | //Constraints and foreign keys |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $innerStatement[] = $reference->sqlStatement(); |
278 | 278 | } |
279 | 279 | |
280 | - $statement[] = " " . join(",\n ", $innerStatement); |
|
280 | + $statement[] = " ".join(",\n ", $innerStatement); |
|
281 | 281 | $statement[] = ')'; |
282 | 282 | |
283 | 283 | return join("\n", $statement); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function references($table, $column = 'id') |
164 | 164 | { |
165 | - $this->foreignTable = $this->table->getPrefix() . $table; |
|
165 | + $this->foreignTable = $this->table->getPrefix().$table; |
|
166 | 166 | $this->foreignKey = $column; |
167 | 167 | |
168 | 168 | return $this; |
@@ -206,10 +206,10 @@ discard block |
||
206 | 206 | $statement[] = 'CONSTRAINT'; |
207 | 207 | $statement[] = $this->getName(true); |
208 | 208 | $statement[] = 'FOREIGN KEY'; |
209 | - $statement[] = '(' . $this->table->driver()->identifier($this->column) . ')'; |
|
209 | + $statement[] = '('.$this->table->driver()->identifier($this->column).')'; |
|
210 | 210 | |
211 | - $statement[] = 'REFERENCES ' . $this->table->driver()->identifier($this->foreignTable); |
|
212 | - $statement[] = '(' . $this->table->driver()->identifier($this->foreignKey) . ')'; |
|
211 | + $statement[] = 'REFERENCES '.$this->table->driver()->identifier($this->foreignTable); |
|
212 | + $statement[] = '('.$this->table->driver()->identifier($this->foreignKey).')'; |
|
213 | 213 | |
214 | 214 | $statement[] = "ON DELETE {$this->deleteRule}"; |
215 | 215 | $statement[] = "ON UPDATE {$this->updateRule}"; |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | protected function generateName() |
240 | 240 | { |
241 | - $name = $this->table->getName() . '_foreign_' . $this->column . '_' . uniqid(); |
|
241 | + $name = $this->table->getName().'_foreign_'.$this->column.'_'.uniqid(); |
|
242 | 242 | |
243 | 243 | if (strlen($name) > 64) { |
244 | 244 | //Many dbs has limitations on identifier length |
@@ -731,7 +731,7 @@ |
||
731 | 731 | } |
732 | 732 | |
733 | 733 | if (!empty($enumValues)) { |
734 | - return '(' . join(', ', $enumValues) . ')'; |
|
734 | + return '('.join(', ', $enumValues).')'; |
|
735 | 735 | } |
736 | 736 | |
737 | 737 | return ''; |
@@ -153,7 +153,7 @@ |
||
153 | 153 | protected function generateName() |
154 | 154 | { |
155 | 155 | //We can generate name |
156 | - $name = $this->table->getName() . '_index_' . join('_', $this->columns) . '_' . uniqid(); |
|
156 | + $name = $this->table->getName().'_index_'.join('_', $this->columns).'_'.uniqid(); |
|
157 | 157 | |
158 | 158 | if (strlen($name) > 64) { |
159 | 159 | //Many dbs has limitations on identifier length |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $statement = ''; |
54 | 54 | if (!empty($limit) || !empty($offset)) { |
55 | 55 | //When limit is not provided but offset does we can replace limit value with PHP_INT_MAX |
56 | - $statement = "LIMIT " . ($limit ?: '18446744073709551615') . ' '; |
|
56 | + $statement = "LIMIT ".($limit ?: '18446744073709551615').' '; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | if (!empty($offset)) { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | */ |
58 | 58 | public function identifier($identifier) |
59 | 59 | { |
60 | - return $identifier == '*' ? '*' : '`' . str_replace('`', '``', $identifier) . '`'; |
|
60 | + return $identifier == '*' ? '*' : '`'.str_replace('`', '``', $identifier).'`'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |