@@ -114,7 +114,7 @@ |
||
| 114 | 114 | * |
| 115 | 115 | * @return array |
| 116 | 116 | */ |
| 117 | - public function userTypes() ; |
|
| 117 | + public function userTypes(); |
|
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Get existing schemas |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * @return boolean |
| 67 | 67 | */ |
| 68 | - public function createDatabase(string $database, string $collation) ; |
|
| 68 | + public function createDatabase(string $database, string $collation); |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * Drop databases |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * |
| 92 | 92 | * @return array |
| 93 | 93 | */ |
| 94 | - public function routineLanguages() ; |
|
| 94 | + public function routineLanguages(); |
|
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * Get server variables |
@@ -495,7 +495,7 @@ |
||
| 495 | 495 | public function applyQueries(string $query, array $tables, $escape = null) |
| 496 | 496 | { |
| 497 | 497 | if (!$escape) { |
| 498 | - $escape = function ($table) { |
|
| 498 | + $escape = function($table) { |
|
| 499 | 499 | return $this->table($table); |
| 500 | 500 | }; |
| 501 | 501 | } |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | $database = $foreignKey->database; |
| 92 | 92 | $schema = $foreignKey->schema; |
| 93 | 93 | $onActions = $this->driver->actions(); |
| 94 | - $sources = implode(', ', array_map(function ($idf) { |
|
| 94 | + $sources = implode(', ', array_map(function($idf) { |
|
| 95 | 95 | return $this->escapeId($idf); |
| 96 | 96 | }, $foreignKey->source)); |
| 97 | - $targets = implode(', ', array_map(function ($idf) { |
|
| 97 | + $targets = implode(', ', array_map(function($idf) { |
|
| 98 | 98 | return $this->escapeId($idf); |
| 99 | 99 | }, $foreignKey->target)); |
| 100 | 100 | |
@@ -167,8 +167,7 @@ discard block |
||
| 167 | 167 | $query .= ' WHERE ' . implode(' AND ', $where); |
| 168 | 168 | } |
| 169 | 169 | return ($isGroup && ($this->driver->jush() == 'sql' || count($groups) == 1) ? |
| 170 | - 'SELECT COUNT(DISTINCT ' . implode(', ', $groups) . ")$query" : |
|
| 171 | - 'SELECT COUNT(*)' . ($isGroup ? " FROM (SELECT 1$query GROUP BY " . |
|
| 170 | + 'SELECT COUNT(DISTINCT ' . implode(', ', $groups) . ")$query" : 'SELECT COUNT(*)' . ($isGroup ? " FROM (SELECT 1$query GROUP BY " . |
|
| 172 | 171 | implode(', ', $groups) . ') x' : $query) |
| 173 | 172 | ); |
| 174 | 173 | } |
@@ -199,8 +198,7 @@ discard block |
||
| 199 | 198 | */ |
| 200 | 199 | private function notQuery(QueryEntity $queryEntity, string $found, array &$match) |
| 201 | 200 | { |
| 202 | - return preg_match('(' . ($found == '/*' ? '\*/' : ($found == '[' ? ']' : |
|
| 203 | - (preg_match('~^-- |^#~', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', |
|
| 201 | + return preg_match('(' . ($found == '/*' ? '\*/' : ($found == '[' ? ']' : (preg_match('~^-- |^#~', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', |
|
| 204 | 202 | $queryEntity->queries, $match, PREG_OFFSET_CAPTURE, $queryEntity->offset) > 0; |
| 205 | 203 | } |
| 206 | 204 | |