@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $flags['querytype'] = 'SELECT'; |
232 | 232 | $flags['is_select'] = true; |
233 | 233 | |
234 | - if (! empty($statement->from)) { |
|
234 | + if (!empty($statement->from)) { |
|
235 | 235 | $flags['select_from'] = true; |
236 | 236 | } |
237 | 237 | |
@@ -239,25 +239,25 @@ discard block |
||
239 | 239 | $flags['distinct'] = true; |
240 | 240 | } |
241 | 241 | |
242 | - if (! empty($statement->group) || ! empty($statement->having)) { |
|
242 | + if (!empty($statement->group) || !empty($statement->having)) { |
|
243 | 243 | $flags['is_group'] = true; |
244 | 244 | } |
245 | 245 | |
246 | - if (! empty($statement->into) |
|
246 | + if (!empty($statement->into) |
|
247 | 247 | && ($statement->into->type === 'OUTFILE') |
248 | 248 | ) { |
249 | 249 | $flags['is_export'] = true; |
250 | 250 | } |
251 | 251 | |
252 | 252 | $expressions = $statement->expr; |
253 | - if (! empty($statement->join)) { |
|
253 | + if (!empty($statement->join)) { |
|
254 | 254 | foreach ($statement->join as $join) { |
255 | 255 | $expressions[] = $join->expr; |
256 | 256 | } |
257 | 257 | } |
258 | 258 | |
259 | 259 | foreach ($expressions as $expr) { |
260 | - if (! empty($expr->function)) { |
|
260 | + if (!empty($expr->function)) { |
|
261 | 261 | if ($expr->function === 'COUNT') { |
262 | 262 | $flags['is_count'] = true; |
263 | 263 | } elseif (in_array($expr->function, static::$FUNCTIONS)) { |
@@ -272,25 +272,25 @@ discard block |
||
272 | 272 | $flags['is_subquery'] = true; |
273 | 273 | } |
274 | 274 | |
275 | - if (! empty($statement->procedure) |
|
275 | + if (!empty($statement->procedure) |
|
276 | 276 | && ($statement->procedure->name === 'ANALYSE') |
277 | 277 | ) { |
278 | 278 | $flags['is_analyse'] = true; |
279 | 279 | } |
280 | 280 | |
281 | - if (! empty($statement->group)) { |
|
281 | + if (!empty($statement->group)) { |
|
282 | 282 | $flags['group'] = true; |
283 | 283 | } |
284 | 284 | |
285 | - if (! empty($statement->having)) { |
|
285 | + if (!empty($statement->having)) { |
|
286 | 286 | $flags['having'] = true; |
287 | 287 | } |
288 | 288 | |
289 | - if (! empty($statement->union)) { |
|
289 | + if (!empty($statement->union)) { |
|
290 | 290 | $flags['union'] = true; |
291 | 291 | } |
292 | 292 | |
293 | - if (! empty($statement->join)) { |
|
293 | + if (!empty($statement->join)) { |
|
294 | 294 | $flags['join'] = true; |
295 | 295 | } |
296 | 296 | |
@@ -381,11 +381,11 @@ discard block |
||
381 | 381 | || ($statement instanceof UpdateStatement) |
382 | 382 | || ($statement instanceof DeleteStatement) |
383 | 383 | ) { |
384 | - if (! empty($statement->limit)) { |
|
384 | + if (!empty($statement->limit)) { |
|
385 | 385 | $flags['limit'] = true; |
386 | 386 | } |
387 | 387 | |
388 | - if (! empty($statement->order)) { |
|
388 | + if (!empty($statement->order)) { |
|
389 | 389 | $flags['order'] = true; |
390 | 390 | } |
391 | 391 | } |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | // Finding tables' aliases and their associated real names. |
431 | 431 | $tableAliases = []; |
432 | 432 | foreach ($statement->from as $expr) { |
433 | - if (! isset($expr->table, $expr->alias) || ($expr->table === '') || ($expr->alias === '') |
|
433 | + if (!isset($expr->table, $expr->alias) || ($expr->table === '') || ($expr->alias === '') |
|
434 | 434 | ) { |
435 | 435 | continue; |
436 | 436 | } |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | ]; |
457 | 457 | } |
458 | 458 | |
459 | - if (! in_array($arr, $ret['select_tables'])) { |
|
459 | + if (!in_array($arr, $ret['select_tables'])) { |
|
460 | 460 | $ret['select_tables'][] = $arr; |
461 | 461 | } |
462 | 462 | } else { |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | // extracted from the FROM clause. |
470 | 470 | if (empty($ret['select_tables'])) { |
471 | 471 | foreach ($statement->from as $expr) { |
472 | - if (! isset($expr->table) || ($expr->table === '')) { |
|
472 | + if (!isset($expr->table) || ($expr->table === '')) { |
|
473 | 473 | continue; |
474 | 474 | } |
475 | 475 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | ) { |
517 | 517 | $expressions = [$statement->table]; |
518 | 518 | } elseif ($statement instanceof DropStatement) { |
519 | - if (! $statement->options->has('TABLE')) { |
|
519 | + if (!$statement->options->has('TABLE')) { |
|
520 | 520 | // No tables are dropped. |
521 | 521 | return []; |
522 | 522 | } |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | |
807 | 807 | $statement .= $token->token; |
808 | 808 | |
809 | - if (($token->type === Token::TYPE_DELIMITER) && ! empty($token->token)) { |
|
809 | + if (($token->type === Token::TYPE_DELIMITER) && !empty($token->token)) { |
|
810 | 810 | $delimiter = $token->token; |
811 | 811 | $fullStatement = true; |
812 | 812 | break; |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | |
816 | 816 | // No statement was found so we return the entire query as being the |
817 | 817 | // remaining part. |
818 | - if (! $fullStatement) { |
|
818 | + if (!$fullStatement) { |
|
819 | 819 | return [ |
820 | 820 | null, |
821 | 821 | $query, |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | public static function getForeignKeys($statement) |
27 | 27 | { |
28 | 28 | if (empty($statement->fields) |
29 | - || (! is_array($statement->fields)) |
|
30 | - || (! $statement->options->has('TABLE')) |
|
29 | + || (!is_array($statement->fields)) |
|
30 | + || (!$statement->options->has('TABLE')) |
|
31 | 31 | ) { |
32 | 32 | return []; |
33 | 33 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'index_list' => $columns, |
50 | 50 | ]; |
51 | 51 | |
52 | - if (! empty($field->references)) { |
|
52 | + if (!empty($field->references)) { |
|
53 | 53 | $tmp['ref_db_name'] = $field->references->table->database; |
54 | 54 | $tmp['ref_table_name'] = $field->references->table->table; |
55 | 55 | $tmp['ref_index_list'] = $field->references->columns; |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | public static function getFields($statement) |
84 | 84 | { |
85 | 85 | if (empty($statement->fields) |
86 | - || (! is_array($statement->fields)) |
|
87 | - || (! $statement->options->has('TABLE')) |
|
86 | + || (!is_array($statement->fields)) |
|
87 | + || (!$statement->options->has('TABLE')) |
|
88 | 88 | ) { |
89 | 89 | return []; |
90 | 90 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'timestamp_not_null' => false, |
103 | 103 | ]; |
104 | 104 | |
105 | - if (! $field->options) { |
|
105 | + if (!$field->options) { |
|
106 | 106 | continue; |
107 | 107 | } |
108 | 108 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | $option = $field->options->has('AS'); |
131 | 131 | |
132 | - if (! $option) { |
|
132 | + if (!$option) { |
|
133 | 133 | continue; |
134 | 134 | } |
135 | 135 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | foreach ($longopts as $value) { |
37 | 37 | $value = rtrim($value, ':'); |
38 | - if (! isset($params[$value])) { |
|
38 | + if (!isset($params[$value])) { |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 | |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | $this->mergeLongOpts($params, $longopts); |
86 | - if (! isset($params['f'])) { |
|
86 | + if (!isset($params['f'])) { |
|
87 | 87 | $params['f'] = 'cli'; |
88 | 88 | } |
89 | 89 | |
90 | - if (! in_array($params['f'], ['html', 'cli', 'text'])) { |
|
90 | + if (!in_array($params['f'], ['html', 'cli', 'text'])) { |
|
91 | 91 | echo "ERROR: Invalid value for format!\n"; |
92 | 92 | |
93 | 93 | return false; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return 0; |
113 | 113 | } |
114 | 114 | |
115 | - if (! isset($params['q'])) { |
|
115 | + if (!isset($params['q'])) { |
|
116 | 116 | $stdIn = $this->readStdin(); |
117 | 117 | |
118 | 118 | if ($stdIn) { |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | Context::load($params['c']); |
189 | 189 | } |
190 | 190 | |
191 | - if (! isset($params['q'])) { |
|
191 | + if (!isset($params['q'])) { |
|
192 | 192 | $stdIn = $this->readStdin(); |
193 | 193 | |
194 | 194 | if ($stdIn) { |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | return 0; |
265 | 265 | } |
266 | 266 | |
267 | - if (! isset($params['q'])) { |
|
267 | + if (!isset($params['q'])) { |
|
268 | 268 | $stdIn = $this->readStdin(); |
269 | 269 | |
270 | 270 | if ($stdIn) { |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | |
428 | 428 | // The options of a clause should stay on the same line and everything that follows. |
429 | 429 | if ($this->options['parts_newline'] |
430 | - && ! $formattedOptions |
|
430 | + && !$formattedOptions |
|
431 | 431 | && empty(self::$INLINE_CLAUSES[$lastClause]) |
432 | 432 | && ( |
433 | 433 | $curr->type !== Token::TYPE_KEYWORD |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | if (end($blocksLineEndings) === true |
485 | 485 | || ( |
486 | 486 | empty(self::$INLINE_CLAUSES[$lastClause]) |
487 | - && ! $shortGroup |
|
487 | + && !$shortGroup |
|
488 | 488 | && $this->options['parts_newline'] |
489 | 489 | ) |
490 | 490 | ) { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | // Also, some tokens do not have spaces before or after them. |
526 | 526 | if (// A space after delimiters that are longer than 2 characters. |
527 | 527 | $prev->keyword === 'DELIMITER' |
528 | - || ! ( |
|
528 | + || !( |
|
529 | 529 | ($prev->type === Token::TYPE_OPERATOR && ($prev->value === '.' || $prev->value === '(')) |
530 | 530 | // No space after . ( |
531 | 531 | || ($curr->type === Token::TYPE_OPERATOR |
@@ -640,13 +640,13 @@ discard block |
||
640 | 640 | |
641 | 641 | foreach ($this->options['formats'] as $format) { |
642 | 642 | if ($token->type !== $format['type'] |
643 | - || ! (($token->flags & $format['flags']) === $format['flags']) |
|
643 | + || !(($token->flags & $format['flags']) === $format['flags']) |
|
644 | 644 | ) { |
645 | 645 | continue; |
646 | 646 | } |
647 | 647 | |
648 | 648 | // Running transformation function. |
649 | - if (! empty($format['function'])) { |
|
649 | + if (!empty($format['function'])) { |
|
650 | 650 | $func = $format['function']; |
651 | 651 | $text = $func($text); |
652 | 652 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | // The code below extracts only the relevant information. |
72 | 72 | |
73 | 73 | // Extracting lexer's errors. |
74 | - if (! empty($lexer->errors)) { |
|
74 | + if (!empty($lexer->errors)) { |
|
75 | 75 | foreach ($lexer->errors as $err) { |
76 | 76 | $lexerErrors[] = [ |
77 | 77 | $err->getMessage(), |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | // Extracting parser's errors. |
88 | - if (! empty($parser->errors)) { |
|
88 | + if (!empty($parser->errors)) { |
|
89 | 89 | foreach ($parser->errors as $err) { |
90 | 90 | $parserErrors[] = [ |
91 | 91 | $err->getMessage(), |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public static function build($type, $input, $output, $debug = null, $ansi = false) |
123 | 123 | { |
124 | 124 | // Support query types: `lexer` / `parser`. |
125 | - if (! in_array($type, ['lexer', 'parser'])) { |
|
125 | + if (!in_array($type, ['lexer', 'parser'])) { |
|
126 | 126 | throw new Exception('Unknown test type (expected `lexer` or `parser`).'); |
127 | 127 | } |
128 | 128 | |
@@ -184,11 +184,11 @@ discard block |
||
184 | 184 | if (is_dir($inputFile)) { |
185 | 185 | // Creating required directories to maintain the structure. |
186 | 186 | // Ignoring errors if the folder structure exists already. |
187 | - if (! is_dir($outputFile)) { |
|
187 | + if (!is_dir($outputFile)) { |
|
188 | 188 | mkdir($outputFile); |
189 | 189 | } |
190 | 190 | |
191 | - if (($debug !== null) && (! is_dir($debugFile))) { |
|
191 | + if (($debug !== null) && (!is_dir($debugFile))) { |
|
192 | 192 | mkdir($debugFile); |
193 | 193 | } |
194 | 194 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | // Building the test. |
206 | - if (! file_exists($outputFile)) { |
|
206 | + if (!file_exists($outputFile)) { |
|
207 | 207 | sprintf("Building test for %s...\n", $inputFile); |
208 | 208 | static::build( |
209 | 209 | strpos($inputFile, 'lex') !== false ? 'lexer' : 'parser', |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | // Checking if this field was already built. |
174 | 174 | if ($type & 1) { |
175 | - if (! empty($built[$field])) { |
|
175 | + if (!empty($built[$field])) { |
|
176 | 176 | continue; |
177 | 177 | } |
178 | 178 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | // Checking if the result of the builder should be added. |
188 | - if (! ($type & 1)) { |
|
188 | + if (!($type & 1)) { |
|
189 | 189 | continue; |
190 | 190 | } |
191 | 191 | |
@@ -317,10 +317,10 @@ discard block |
||
317 | 317 | $options = []; |
318 | 318 | |
319 | 319 | // Looking for duplicated clauses. |
320 | - if (! empty(Parser::$KEYWORD_PARSERS[$token->value]) |
|
321 | - || ! empty(Parser::$STATEMENT_PARSERS[$token->value]) |
|
320 | + if (!empty(Parser::$KEYWORD_PARSERS[$token->value]) |
|
321 | + || !empty(Parser::$STATEMENT_PARSERS[$token->value]) |
|
322 | 322 | ) { |
323 | - if (! empty($parsedClauses[$token->value])) { |
|
323 | + if (!empty($parsedClauses[$token->value])) { |
|
324 | 324 | $parser->error( |
325 | 325 | 'This type of clause was previously parsed.', |
326 | 326 | $token |
@@ -336,17 +336,17 @@ discard block |
||
336 | 336 | // but it might be the beginning of a statement of truncate, |
337 | 337 | // so let the value use the keyword field for truncate type. |
338 | 338 | $token_value = in_array($token->keyword, ['TRUNCATE']) ? $token->keyword : $token->value; |
339 | - if (! empty(Parser::$KEYWORD_PARSERS[$token_value]) && $list->idx < $list->count) { |
|
339 | + if (!empty(Parser::$KEYWORD_PARSERS[$token_value]) && $list->idx < $list->count) { |
|
340 | 340 | $class = Parser::$KEYWORD_PARSERS[$token_value]['class']; |
341 | 341 | $field = Parser::$KEYWORD_PARSERS[$token_value]['field']; |
342 | - if (! empty(Parser::$KEYWORD_PARSERS[$token_value]['options'])) { |
|
342 | + if (!empty(Parser::$KEYWORD_PARSERS[$token_value]['options'])) { |
|
343 | 343 | $options = Parser::$KEYWORD_PARSERS[$token_value]['options']; |
344 | 344 | } |
345 | 345 | } |
346 | 346 | |
347 | 347 | // Checking if this is the beginning of the statement. |
348 | - if (! empty(Parser::$STATEMENT_PARSERS[$token->keyword])) { |
|
349 | - if (! empty(static::$CLAUSES) // Undefined for some statements. |
|
348 | + if (!empty(Parser::$STATEMENT_PARSERS[$token->keyword])) { |
|
349 | + if (!empty(static::$CLAUSES) // Undefined for some statements. |
|
350 | 350 | && empty(static::$CLAUSES[$token->value]) |
351 | 351 | ) { |
352 | 352 | // Some keywords (e.g. `SET`) may be the beginning of a |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | break; |
362 | 362 | } |
363 | 363 | |
364 | - if (! $parsedOptions) { |
|
364 | + if (!$parsedOptions) { |
|
365 | 365 | if (empty(static::$OPTIONS[$token->value])) { |
366 | 366 | // Skipping keyword because if it is not a option. |
367 | 367 | ++$list->idx; |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | if ($minJoin === 0 && stripos($clauseType, 'JOIN')) { |
547 | 547 | // First JOIN clause is detected |
548 | 548 | $minJoin = $maxJoin = $clauseStartIdx; |
549 | - } elseif ($minJoin !== 0 && ! stripos($clauseType, 'JOIN')) { |
|
549 | + } elseif ($minJoin !== 0 && !stripos($clauseType, 'JOIN')) { |
|
550 | 550 | // After a previous JOIN clause, a non-JOIN clause has been detected |
551 | 551 | $maxJoin = $lastIdx; |
552 | 552 | } elseif ($maxJoin < $clauseStartIdx && stripos($clauseType, 'JOIN')) { |
@@ -278,7 +278,7 @@ |
||
278 | 278 | public static function build($component, array $options = []) |
279 | 279 | { |
280 | 280 | if ($component->dest instanceof Expression) { |
281 | - $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
281 | + $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
282 | 282 | |
283 | 283 | return $component->dest . $columns; |
284 | 284 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | ]; |
201 | 201 | |
202 | 202 | // When a field is parsed, no parentheses are expected. |
203 | - if (! empty($options['parseField'])) { |
|
203 | + if (!empty($options['parseField'])) { |
|
204 | 204 | $options['breakOnParentheses'] = true; |
205 | 205 | $options['field'] = $options['parseField']; |
206 | 206 | } |
@@ -231,14 +231,14 @@ discard block |
||
231 | 231 | |
232 | 232 | if ($token->type === Token::TYPE_KEYWORD) { |
233 | 233 | if (($brackets > 0) && empty($ret->subquery) |
234 | - && ! empty(Parser::$STATEMENT_PARSERS[$token->keyword]) |
|
234 | + && !empty(Parser::$STATEMENT_PARSERS[$token->keyword]) |
|
235 | 235 | ) { |
236 | 236 | // A `(` was previously found and this keyword is the |
237 | 237 | // beginning of a statement, so this is a subquery. |
238 | 238 | $ret->subquery = $token->keyword; |
239 | 239 | } elseif (($token->flags & Token::FLAG_KEYWORD_FUNCTION) |
240 | 240 | && (empty($options['parseField']) |
241 | - && ! $alias) |
|
241 | + && !$alias) |
|
242 | 242 | ) { |
243 | 243 | $isExpr = true; |
244 | 244 | } elseif (($token->flags & Token::FLAG_KEYWORD_RESERVED) |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | } |
253 | 253 | |
254 | 254 | if ($token->keyword === 'AS') { |
255 | - if (! empty($options['breakOnAlias'])) { |
|
255 | + if (!empty($options['breakOnAlias'])) { |
|
256 | 256 | break; |
257 | 257 | } |
258 | 258 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | $isExpr = true; |
281 | - } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && ! $alias) { |
|
281 | + } elseif ($brackets === 0 && strlen((string) $ret->expr) > 0 && !$alias) { |
|
282 | 282 | /* End of expression */ |
283 | 283 | break; |
284 | 284 | } |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | || (($token->type === Token::TYPE_OPERATOR) |
294 | 294 | && ($token->value !== '.')) |
295 | 295 | ) { |
296 | - if (! empty($options['parseField'])) { |
|
296 | + if (!empty($options['parseField'])) { |
|
297 | 297 | break; |
298 | 298 | } |
299 | 299 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | if ($token->type === Token::TYPE_OPERATOR) { |
306 | - if (! empty($options['breakOnParentheses']) |
|
306 | + if (!empty($options['breakOnParentheses']) |
|
307 | 307 | && (($token->value === '(') || ($token->value === ')')) |
308 | 308 | ) { |
309 | 309 | // No brackets were expected. |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | --$brackets; |
330 | 330 | if ($brackets === 0) { |
331 | - if (! empty($options['parenthesesDelimited'])) { |
|
331 | + if (!empty($options['parenthesesDelimited'])) { |
|
332 | 332 | // The current token is the last bracket, the next |
333 | 333 | // one will be outside the expression. |
334 | 334 | $ret->expr .= $token->token; |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | |
355 | 355 | if ($alias) { |
356 | 356 | // An alias is expected (the keyword `AS` was previously found). |
357 | - if (! empty($ret->alias)) { |
|
357 | + if (!empty($ret->alias)) { |
|
358 | 358 | $parser->error('An alias was previously found.', $token); |
359 | 359 | break; |
360 | 360 | } |
@@ -367,13 +367,13 @@ discard block |
||
367 | 367 | && ($prev[0] === null |
368 | 368 | || (($prev[0]->type !== Token::TYPE_OPERATOR || $prev[0]->token === ')') |
369 | 369 | && ($prev[0]->type !== Token::TYPE_KEYWORD |
370 | - || ! ($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED)))) |
|
370 | + || !($prev[0]->flags & Token::FLAG_KEYWORD_RESERVED)))) |
|
371 | 371 | && (($prev[1]->type === Token::TYPE_STRING) |
372 | 372 | || ($prev[1]->type === Token::TYPE_SYMBOL |
373 | - && ! ($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)) |
|
373 | + && !($prev[1]->flags & Token::FLAG_SYMBOL_VARIABLE)) |
|
374 | 374 | || ($prev[1]->type === Token::TYPE_NONE)) |
375 | 375 | ) { |
376 | - if (! empty($ret->alias)) { |
|
376 | + if (!empty($ret->alias)) { |
|
377 | 377 | $parser->error('An alias was previously found.', $token); |
378 | 378 | break; |
379 | 379 | } |
@@ -382,12 +382,12 @@ discard block |
||
382 | 382 | } else { |
383 | 383 | $ret->expr .= $token->token; |
384 | 384 | } |
385 | - } elseif (! $isExpr) { |
|
385 | + } elseif (!$isExpr) { |
|
386 | 386 | if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '.')) { |
387 | 387 | // Found a `.` which means we expect a column name and |
388 | 388 | // the column name we parsed is actually the table name |
389 | 389 | // and the table name is actually a database name. |
390 | - if (! empty($ret->database) || $dot) { |
|
390 | + if (!empty($ret->database) || $dot) { |
|
391 | 391 | $parser->error('Unexpected dot.', $token); |
392 | 392 | } |
393 | 393 | |
@@ -404,11 +404,11 @@ discard block |
||
404 | 404 | $dot = false; |
405 | 405 | } else { |
406 | 406 | // No alias is expected. |
407 | - if (! empty($options['breakOnAlias'])) { |
|
407 | + if (!empty($options['breakOnAlias'])) { |
|
408 | 408 | break; |
409 | 409 | } |
410 | 410 | |
411 | - if (! empty($ret->alias)) { |
|
411 | + if (!empty($ret->alias)) { |
|
412 | 412 | $parser->error('An alias was previously found.', $token); |
413 | 413 | break; |
414 | 414 | } |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $ret = implode('.', Context::escape($fields)); |
470 | 470 | } |
471 | 471 | |
472 | - if (! empty($component->alias)) { |
|
472 | + if (!empty($component->alias)) { |
|
473 | 473 | $ret .= ' AS ' . Context::escape($component->alias); |
474 | 474 | } |
475 | 475 |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } else { |
154 | 154 | // The expression ended. |
155 | 155 | $expr->expr = trim($expr->expr); |
156 | - if (! empty($expr->expr)) { |
|
156 | + if (!empty($expr->expr)) { |
|
157 | 157 | $ret[] = $expr; |
158 | 158 | } |
159 | 159 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | if (($token->type === Token::TYPE_KEYWORD) |
172 | 172 | && ($token->flags & Token::FLAG_KEYWORD_RESERVED) |
173 | - && ! ($token->flags & Token::FLAG_KEYWORD_FUNCTION) |
|
173 | + && !($token->flags & Token::FLAG_KEYWORD_FUNCTION) |
|
174 | 174 | ) { |
175 | 175 | if ($token->value === 'BETWEEN') { |
176 | 176 | $betweenBefore = true; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | // Last iteration was not processed. |
214 | 214 | $expr->expr = trim($expr->expr); |
215 | - if (! empty($expr->expr)) { |
|
215 | + if (!empty($expr->expr)) { |
|
216 | 216 | $ret[] = $expr; |
217 | 217 | } |
218 | 218 |