@@ -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; |
@@ -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); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | if ($state === 0) { |
115 | - if ($token->type !== TokenType::None || ! preg_match('/^[a-zA-Z0-9_$]+$/', $token->token)) { |
|
115 | + if ($token->type !== TokenType::None || !preg_match('/^[a-zA-Z0-9_$]+$/', $token->token)) { |
|
116 | 116 | $parser->error('The name of the CTE was expected.', $token); |
117 | 117 | break; |
118 | 118 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | break; |
137 | 137 | } |
138 | 138 | } elseif ($state === 2) { |
139 | - if (! ($token->type === TokenType::Keyword && $token->keyword === 'AS')) { |
|
139 | + if (!($token->type === TokenType::Keyword && $token->keyword === 'AS')) { |
|
140 | 140 | $parser->error('AS keyword was expected.', $token); |
141 | 141 | break; |
142 | 142 | } |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $list->idx++; // Ignore the current token |
149 | 149 | $nextKeyword = $list->getNext(); |
150 | 150 | |
151 | - if (! ($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) { |
|
151 | + if (!($token->value === '(' && ($nextKeyword && $nextKeyword->value === 'SELECT'))) { |
|
152 | 152 | $parser->error('Subquery of the CTE was expected.', $token); |
153 | 153 | $list->idx = $idxBeforeGetNext; |
154 | 154 | break; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | /** |
296 | 296 | * Get tokens within the WITH expression to use them in another parser |
297 | 297 | */ |
298 | - private function getSubTokenList(TokensList $list): ParserException|TokensList |
|
298 | + private function getSubTokenList(TokensList $list): ParserException | TokensList |
|
299 | 299 | { |
300 | 300 | $idx = $list->idx; |
301 | 301 | $token = $list->tokens[$list->idx]; |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | ++$list->idx; |
314 | - if (! isset($list->tokens[$list->idx])) { |
|
314 | + if (!isset($list->tokens[$list->idx])) { |
|
315 | 315 | break; |
316 | 316 | } |
317 | 317 |
@@ -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 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | foreach ($parser->statements as $statement) { |
65 | 65 | if ($statement instanceof TransactionStatement) { |
66 | 66 | foreach ($statement->statements as $transactionStatement) { |
67 | - if (! $transactionStatement instanceof SetStatement) { |
|
67 | + if (!$transactionStatement instanceof SetStatement) { |
|
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | continue; |
75 | 75 | } |
76 | 76 | |
77 | - if (! $statement instanceof SetStatement) { |
|
77 | + if (!$statement instanceof SetStatement) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 |
@@ -149,14 +149,14 @@ |
||
149 | 149 | * |
150 | 150 | * @var Expression[]|null |
151 | 151 | */ |
152 | - public array|null $columnNamesOrUserVariables = null; |
|
152 | + public array | null $columnNamesOrUserVariables = null; |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * SET clause's updated values(optional). |
156 | 156 | * |
157 | 157 | * @var SetOperation[]|null |
158 | 158 | */ |
159 | - public array|null $set = null; |
|
159 | + public array | null $set = null; |
|
160 | 160 | |
161 | 161 | /** |
162 | 162 | * Ignore 'number' LINES/ROWS. |
@@ -106,28 +106,28 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @var Expression[]|null |
108 | 108 | */ |
109 | - public array|null $from = null; |
|
109 | + public array | null $from = null; |
|
110 | 110 | |
111 | 111 | /** |
112 | 112 | * Joins. |
113 | 113 | * |
114 | 114 | * @var JoinKeyword[]|null |
115 | 115 | */ |
116 | - public array|null $join = null; |
|
116 | + public array | null $join = null; |
|
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Tables used as sources for this statement. |
120 | 120 | * |
121 | 121 | * @var Expression[]|null |
122 | 122 | */ |
123 | - public array|null $using = null; |
|
123 | + public array | null $using = null; |
|
124 | 124 | |
125 | 125 | /** |
126 | 126 | * Columns used in this statement. |
127 | 127 | * |
128 | 128 | * @var Expression[]|null |
129 | 129 | */ |
130 | - public array|null $columns = null; |
|
130 | + public array | null $columns = null; |
|
131 | 131 | |
132 | 132 | /** |
133 | 133 | * Partitions used as source for this statement. |
@@ -141,14 +141,14 @@ discard block |
||
141 | 141 | * |
142 | 142 | * @var Condition[]|null |
143 | 143 | */ |
144 | - public array|null $where = null; |
|
144 | + public array | null $where = null; |
|
145 | 145 | |
146 | 146 | /** |
147 | 147 | * Specifies the order of the rows in the result set. |
148 | 148 | * |
149 | 149 | * @var OrderKeyword[]|null |
150 | 150 | */ |
151 | - public array|null $order = null; |
|
151 | + public array | null $order = null; |
|
152 | 152 | |
153 | 153 | /** |
154 | 154 | * Conditions used for limiting the size of the result set. |