@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @return string|boolean |
90 | 90 | */ |
91 | - public function createDatabase(string $database, string $collation) ; |
|
91 | + public function createDatabase(string $database, string $collation); |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * Drop databases |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * |
132 | 132 | * @return array |
133 | 133 | */ |
134 | - public function routineLanguages() ; |
|
134 | + public function routineLanguages(); |
|
135 | 135 | |
136 | 136 | /** |
137 | 137 | * Get routine signature |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | * |
149 | 149 | * @return array |
150 | 150 | */ |
151 | - public function userTypes() ; |
|
151 | + public function userTypes(); |
|
152 | 152 | |
153 | 153 | /** |
154 | 154 | * Get existing schemas |
@@ -240,7 +240,7 @@ |
||
240 | 240 | public function applyQueries(string $query, array $tables, $escape = null) |
241 | 241 | { |
242 | 242 | if (!$escape) { |
243 | - $escape = function ($table) { |
|
243 | + $escape = function($table) { |
|
244 | 244 | return $this->driver->table($table); |
245 | 245 | }; |
246 | 246 | } |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | { |
81 | 81 | $db = $foreignKey->db; |
82 | 82 | $schema = $foreignKey->schema; |
83 | - return " FOREIGN KEY (" . implode(", ", array_map(function ($idf) { |
|
83 | + return " FOREIGN KEY (" . implode(", ", array_map(function($idf) { |
|
84 | 84 | return $this->escapeId($idf); |
85 | 85 | }, $foreignKey->source)) . ") REFERENCES " . |
86 | 86 | ($db != "" && $db != $this->driver->database ? $this->escapeId($db) . "." : "") . |
87 | 87 | ($schema != "" && $schema != $this->driver->schema ? $this->escapeId($schema) . "." : "") . |
88 | - $this->table($foreignKey->table) . " (" . implode(", ", array_map(function ($idf) { |
|
88 | + $this->table($foreignKey->table) . " (" . implode(", ", array_map(function($idf) { |
|
89 | 89 | return $this->escapeId($idf); |
90 | 90 | }, $foreignKey->target)) . ")" . //! reuse $name - check in older MySQL versions |
91 | 91 | (preg_match("~^({$this->driver->onActions})\$~", $foreignKey->onDelete) ? " ON DELETE $foreignKey->onDelete" : "") . |
@@ -133,8 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function applySqlFunction(string $function, string $column) |
135 | 135 | { |
136 | - return ($function ? ($function == "unixepoch" ? "DATETIME($column, '$function')" : |
|
137 | - ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)") : $column); |
|
136 | + return ($function ? ($function == "unixepoch" ? "DATETIME($column, '$function')" : ($function == "count distinct" ? "COUNT(DISTINCT " : strtoupper("$function(")) . "$column)") : $column); |
|
138 | 137 | } |
139 | 138 | |
140 | 139 | /** |