@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | $quoted = $driver->identifier($this->name); |
145 | 145 | |
146 | - return "$statement CHECK ({$quoted} IN (" . implode(', ', $enumValues) . '))'; |
|
146 | + return "$statement CHECK ({$quoted} IN (".implode(', ', $enumValues).'))'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | $selectColumns[] = "? AS {$this->quote($column)}"; |
39 | 39 | } |
40 | 40 | |
41 | - $statement[] = 'SELECT ' . implode(', ', $selectColumns); |
|
41 | + $statement[] = 'SELECT '.implode(', ', $selectColumns); |
|
42 | 42 | } else { |
43 | 43 | //It is crityially important to use UNION ALL, UNION will try to merge values together |
44 | 44 | //which will cause non predictable insert order |
45 | - $statement[] = 'UNION ALL SELECT ' . trim(str_repeat('?, ', count($columns)), ', '); |
|
45 | + $statement[] = 'UNION ALL SELECT '.trim(str_repeat('?, ', count($columns)), ', '); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $statement = ''; |
64 | 64 | |
65 | 65 | if (!empty($limit) || !empty($offset)) { |
66 | - $statement = 'LIMIT ' . ($limit ?: '-1') . ' '; |
|
66 | + $statement = 'LIMIT '.($limit ?: '-1').' '; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | if (!empty($offset)) { |
@@ -167,7 +167,7 @@ |
||
167 | 167 | { |
168 | 168 | //Temporary table is required to copy data over |
169 | 169 | $temporary = clone $table; |
170 | - $temporary->setName('spiral_temp_' . $table->getName() . '_' . uniqid()); |
|
170 | + $temporary->setName('spiral_temp_'.$table->getName().'_'.uniqid()); |
|
171 | 171 | |
172 | 172 | //We don't need any indexes in temporary table |
173 | 173 | foreach ($temporary->getIndexes() as $index) { |
@@ -200,7 +200,7 @@ |
||
200 | 200 | |
201 | 201 | //Fetching enum values |
202 | 202 | if ($column->abstractType() == 'enum' && !empty($options)) { |
203 | - $column->enumValues = array_map(function ($value) { |
|
203 | + $column->enumValues = array_map(function($value) { |
|
204 | 204 | return trim($value, $value[0]); |
205 | 205 | }, $options); |
206 | 206 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | if (!empty($limit) || !empty($offset)) { |
32 | 32 | //When limit is not provided (or 0) but offset does we can replace |
33 | 33 | //limit value with PHP_INT_MAX |
34 | - $statement = 'LIMIT ' . ($limit ?: '18446744073709551615') . ' '; |
|
34 | + $statement = 'LIMIT '.($limit ?: '18446744073709551615').' '; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!empty($offset)) { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public function identifier(string $identifier): string |
52 | 52 | { |
53 | - return $identifier == '*' ? '*' : '`' . str_replace('`', '``', $identifier) . '`'; |
|
53 | + return $identifier == '*' ? '*' : '`'.str_replace('`', '``', $identifier).'`'; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -84,7 +84,7 @@ |
||
84 | 84 | throw new SchemaException('MySQLHandler can process only MySQL tables'); |
85 | 85 | } |
86 | 86 | |
87 | - return parent::createStatement($table) . " ENGINE {$table->getEngine()}"; |
|
87 | + return parent::createStatement($table)." ENGINE {$table->getEngine()}"; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -81,7 +81,7 @@ |
||
81 | 81 | */ |
82 | 82 | public function fullName(): string |
83 | 83 | { |
84 | - return $this->database->getPrefix() . $this->name; |
|
84 | + return $this->database->getPrefix().$this->name; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | if (!empty($table->getPrimaryKeys())) { |
331 | 331 | $primaryKeys = array_map([$this, 'identify'], $table->getPrimaryKeys()); |
332 | 332 | |
333 | - $innerStatement[] = 'PRIMARY KEY (' . join(', ', $primaryKeys) . ')'; |
|
333 | + $innerStatement[] = 'PRIMARY KEY ('.join(', ', $primaryKeys).')'; |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | //Constraints and foreign keys |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $innerStatement[] = $reference->sqlStatement($this->driver); |
339 | 339 | } |
340 | 340 | |
341 | - $statement[] = " " . join(",\n ", $innerStatement); |
|
341 | + $statement[] = " ".join(",\n ", $innerStatement); |
|
342 | 342 | $statement[] = ')'; |
343 | 343 | |
344 | 344 | return join("\n", $statement); |