@@ -156,7 +156,7 @@ |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | // Last iteration was not saved. |
| 159 | - if (! empty($expr->old)) { |
|
| 159 | + if (!empty($expr->old)) { |
|
| 160 | 160 | $ret[] = $expr; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | 'opts' => [], |
| 118 | 118 | ]; |
| 119 | 119 | |
| 120 | - if (! empty($statement->parameters)) { |
|
| 120 | + if (!empty($statement->parameters)) { |
|
| 121 | 121 | $idx = 0; |
| 122 | 122 | foreach ($statement->parameters as $param) { |
| 123 | 123 | $retval['dir'][$idx] = $param->inOut; |
@@ -249,7 +249,7 @@ |
||
| 249 | 249 | return trim( |
| 250 | 250 | 'PARTITION ' . $component->name |
| 251 | 251 | . (empty($component->type) ? '' : ' VALUES ' . $component->type . ' ' . $component->expr . ' ') |
| 252 | - . (! empty($component->options) && ! empty($component->type) ? '' : ' ') |
|
| 252 | + . (!empty($component->options) && !empty($component->type) ? '' : ' ') |
|
| 253 | 253 | . $component->options . $subpartitions |
| 254 | 254 | ); |
| 255 | 255 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | $value = strtoupper($value); |
| 175 | - if (! isset($types[$value])) { |
|
| 175 | + if (!isset($types[$value])) { |
|
| 176 | 176 | $types[$value] = $type; |
| 177 | 177 | } else { |
| 178 | 178 | $types[$value] |= $type; |
@@ -182,11 +182,11 @@ discard block |
||
| 182 | 182 | $ret = []; |
| 183 | 183 | foreach ($types as $word => $type) { |
| 184 | 184 | $len = strlen($word); |
| 185 | - if (! isset($ret[$type])) { |
|
| 185 | + if (!isset($ret[$type])) { |
|
| 186 | 186 | $ret[$type] = []; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if (! isset($ret[$type][$len])) { |
|
| 189 | + if (!isset($ret[$type][$len])) { |
|
| 190 | 190 | $ret[$type][$len] = []; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if ($state === 1) { |
| 102 | - if (! $this->isLock) { |
|
| 102 | + if (!$this->isLock) { |
|
| 103 | 103 | // UNLOCK statement should not have any more tokens |
| 104 | 104 | $parser->error('Unexpected token.', $token); |
| 105 | 105 | break; |
@@ -27,15 +27,15 @@ |
||
| 27 | 27 | $debug = empty($argv[3]) ? null : rtrim($argv[3], '/'); |
| 28 | 28 | |
| 29 | 29 | // Checking if all directories are valid. |
| 30 | -if (! is_dir($input)) { |
|
| 30 | +if (!is_dir($input)) { |
|
| 31 | 31 | throw new Exception('The input directory does not exist.'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -if (! is_dir($output)) { |
|
| 34 | +if (!is_dir($output)) { |
|
| 35 | 35 | throw new Exception('The output directory does not exist.'); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -if (($debug !== null) && (! is_dir($debug))) { |
|
| 38 | +if (($debug !== null) && (!is_dir($debug))) { |
|
| 39 | 39 | throw new Exception('The debug directory does not exist.'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | $output = rtrim($argv[2], '/'); |
| 27 | 27 | |
| 28 | 28 | // Checking if all directories are valid. |
| 29 | -if (! is_dir($input)) { |
|
| 29 | +if (!is_dir($input)) { |
|
| 30 | 30 | throw new Exception('The input directory does not exist.'); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -if (! is_dir($output)) { |
|
| 33 | +if (!is_dir($output)) { |
|
| 34 | 34 | throw new Exception('The output directory does not exist.'); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -22,7 +22,6 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * `WITH` statement. |
| 25 | - |
|
| 26 | 25 | * WITH [RECURSIVE] query_name [ (column_name [,...]) ] AS (SELECT ...) [, ...] |
| 27 | 26 | */ |
| 28 | 27 | final class WithStatement extends Statement |
@@ -263,9 +262,9 @@ discard block |
||
| 263 | 262 | |
| 264 | 263 | // 5 is the only valid end state |
| 265 | 264 | if ($state !== 5) { |
| 266 | - /** |
|
| 267 | - * Token parsed at this moment. |
|
| 268 | - */ |
|
| 265 | + /** |
|
| 266 | + * Token parsed at this moment. |
|
| 267 | + */ |
|
| 269 | 268 | $token = $list->tokens[$list->idx]; |
| 270 | 269 | |
| 271 | 270 | $parser->error('Unexpected end of the WITH CTE.', $token); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | break; |
| 131 | 131 | } |
| 132 | 132 | } elseif ($state === 2) { |
| 133 | - if (! ($token->type === TokenType::Keyword && $token->keyword === 'AS')) { |
|
| 133 | + if (!($token->type === TokenType::Keyword && $token->keyword === 'AS')) { |
|
| 134 | 134 | $parser->error('AS keyword was expected.', $token); |
| 135 | 135 | break; |
| 136 | 136 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $list->idx++; // Ignore the current token |
| 143 | 143 | $nextKeyword = $list->getNext(); |
| 144 | 144 | |
| 145 | - if (! ($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) { |
|
| 145 | + if (!($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) { |
|
| 146 | 146 | $parser->error('Subquery of the CTE was expected.', $token); |
| 147 | 147 | $list->idx = $idxBeforeGetNext; |
| 148 | 148 | break; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | /** |
| 290 | 290 | * Get tokens within the WITH expression to use them in another parser |
| 291 | 291 | */ |
| 292 | - private function getSubTokenList(TokensList $list): ParserException|TokensList |
|
| 292 | + private function getSubTokenList(TokensList $list): ParserException | TokensList |
|
| 293 | 293 | { |
| 294 | 294 | $idx = $list->idx; |
| 295 | 295 | $token = $list->tokens[$list->idx]; |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | ++$list->idx; |
| 308 | - if (! isset($list->tokens[$list->idx])) { |
|
| 308 | + if (!isset($list->tokens[$list->idx])) { |
|
| 309 | 309 | break; |
| 310 | 310 | } |
| 311 | 311 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $str1 = new UtfString($this->testContents); |
| 28 | 28 | for ($i = 0; $i < $str1->length(); $i++) { |
| 29 | - $str1[$i];// Make offset offsetGet work |
|
| 29 | + $str1[$i]; // Make offset offsetGet work |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | |