@@ -6,7 +6,7 @@ |
||
6 | 6 | use Rector\Config\RectorConfig; |
7 | 7 | use Rector\Set\ValueObject\LevelSetList; |
8 | 8 | |
9 | -return static function (RectorConfig $rectorConfig): void { |
|
9 | +return static function(RectorConfig $rectorConfig): void { |
|
10 | 10 | $rectorConfig->disableParallel(); |
11 | 11 | |
12 | 12 | $rectorConfig->paths([ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return bool Whether there's an operator at the current offset. |
71 | 71 | */ |
72 | - protected function isOperator(int &$length, string|null &$content): bool |
|
72 | + protected function isOperator(int &$length, string|null&$content): bool |
|
73 | 73 | { |
74 | 74 | $operators = [ |
75 | 75 | '!=', |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * |
114 | 114 | * @return bool Whether there's an identifier at the current offset. |
115 | 115 | */ |
116 | - protected function isIdentifier(int &$length, string|null &$content): bool |
|
116 | + protected function isIdentifier(int &$length, string|null&$content): bool |
|
117 | 117 | { |
118 | 118 | $identifierDelimiters = ['"' => '"', '[' => ']', '`' => '`']; |
119 | 119 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * |
154 | 154 | * @return bool Whether there's a string literal at the current offset. |
155 | 155 | */ |
156 | - protected function isStringLiteral(int &$length, string|null &$content): bool |
|
156 | + protected function isStringLiteral(int &$length, string|null&$content): bool |
|
157 | 157 | { |
158 | 158 | if ($this->substring(1) !== "'") { |
159 | 159 | return false; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * |
185 | 185 | * @return bool Whether the given string is a keyword. |
186 | 186 | */ |
187 | - protected function isKeyword(string $string, string|null &$content): bool |
|
187 | + protected function isKeyword(string $string, string|null&$content): bool |
|
188 | 188 | { |
189 | 189 | $keywords = [ |
190 | 190 | 'ABORT' => true, |
@@ -132,10 +132,10 @@ |
||
132 | 132 | protected function findTableNames(string $schema = ''): array |
133 | 133 | { |
134 | 134 | return $this->db |
135 | - ->createCommand( |
|
136 | - "SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence' ORDER BY tbl_name" |
|
137 | - ) |
|
138 | - ->queryColumn(); |
|
135 | + ->createCommand( |
|
136 | + "SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence' ORDER BY tbl_name" |
|
137 | + ) |
|
138 | + ->queryColumn(); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | $sql = ''; |
86 | 86 | |
87 | 87 | if ($this->hasLimit($limit)) { |
88 | - $sql = 'LIMIT ' . ($limit instanceof ExpressionInterface ? $this->buildExpression($limit) : (string)$limit); |
|
88 | + $sql = 'LIMIT ' . ($limit instanceof ExpressionInterface ? $this->buildExpression($limit) : (string) $limit); |
|
89 | 89 | if ($this->hasOffset($offset)) { |
90 | 90 | $sql .= ' OFFSET ' . |
91 | - ($offset instanceof ExpressionInterface ? $this->buildExpression($offset) : (string)$offset); |
|
91 | + ($offset instanceof ExpressionInterface ? $this->buildExpression($offset) : (string) $offset); |
|
92 | 92 | } |
93 | 93 | } elseif ($this->hasOffset($offset)) { |
94 | 94 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * {@see https://www.sqlite.org/syntaxdiagrams.html#select-stmt} |
98 | 98 | */ |
99 | 99 | $sql = 'LIMIT 999999999999 OFFSET ' . // 2^63-1 |
100 | - ($offset instanceof ExpressionInterface ? $this->buildExpression($offset) : (string)$offset); |
|
100 | + ($offset instanceof ExpressionInterface ? $this->buildExpression($offset) : (string) $offset); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | return $sql; |
@@ -284,7 +284,7 @@ |
||
284 | 284 | |
285 | 285 | if ( |
286 | 286 | $patternToken[$index] instanceof self && |
287 | - $token[$offset] instanceof self && |
|
287 | + $token[$offset] instanceof self && |
|
288 | 288 | !$this->tokensMatch($patternToken[$index], $token[$offset]) |
289 | 289 | ) { |
290 | 290 | continue; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @return bool Whether there's an operator at the current offset. |
171 | 171 | */ |
172 | - abstract protected function isOperator(int &$length, string|null &$content): bool; |
|
172 | + abstract protected function isOperator(int &$length, string|null&$content): bool; |
|
173 | 173 | |
174 | 174 | /** |
175 | 175 | * Returns whether there's an identifier at the current offset. |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | * |
183 | 183 | * @return bool Whether there's an identifier at the current offset. |
184 | 184 | */ |
185 | - abstract protected function isIdentifier(int &$length, string|null &$content): bool; |
|
185 | + abstract protected function isIdentifier(int &$length, string|null&$content): bool; |
|
186 | 186 | |
187 | 187 | /** |
188 | 188 | * Returns whether there's a string literal at the current offset. |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * |
196 | 196 | * @return bool Whether there's a string literal at the current offset. |
197 | 197 | */ |
198 | - abstract protected function isStringLiteral(int &$length, string|null &$content): bool; |
|
198 | + abstract protected function isStringLiteral(int &$length, string|null&$content): bool; |
|
199 | 199 | |
200 | 200 | /** |
201 | 201 | * Returns whether the given string is a keyword. |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * |
208 | 208 | * @return bool Whether the given string is a keyword. |
209 | 209 | */ |
210 | - abstract protected function isKeyword(string $string, string|null &$content): bool; |
|
210 | + abstract protected function isKeyword(string $string, string|null&$content): bool; |
|
211 | 211 | |
212 | 212 | /** |
213 | 213 | * Returns whether the longest common prefix equals to the SQL code of the same length at the current offset. |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | final class SqlParser extends AbstractSqlParser |
10 | 10 | { |
11 | - public function getNextPlaceholder(int|null &$position = null): string|null |
|
11 | + public function getNextPlaceholder(int|null&$position = null): string|null |
|
12 | 12 | { |
13 | 13 | $result = null; |
14 | 14 | $length = $this->length - 1; |