@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | use function strlen; |
| 16 | 16 | use function substr; |
| 17 | 17 | |
| 18 | -if (! defined('USE_UTF_STRINGS')) { |
|
| 18 | +if (!defined('USE_UTF_STRINGS')) { |
|
| 19 | 19 | // NOTE: In previous versions of PHP (5.5 and older) the default |
| 20 | 20 | // internal encoding is "ISO-8859-1". |
| 21 | 21 | // All `mb_` functions must specify the correct encoding, which is |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | // For multi-byte strings, a new instance of `UtfString` is |
| 201 | 201 | // initialized (only if `UtfString` usage is forced. |
| 202 | - if (! $str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) { |
|
| 202 | + if (!$str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) { |
|
| 203 | 203 | $str = new UtfString($str); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $this->strict = $strict; |
| 210 | 210 | |
| 211 | 211 | // Setting the delimiter. |
| 212 | - $this->setDelimiter(! empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER); |
|
| 212 | + $this->setDelimiter(!empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER); |
|
| 213 | 213 | |
| 214 | 214 | $this->lex(); |
| 215 | 215 | } |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $delimiterLen = 0; |
| 338 | 338 | while ( |
| 339 | 339 | ++$this->last < $this->len |
| 340 | - && ! Context::isWhitespace($this->str[$this->last]) |
|
| 340 | + && !Context::isWhitespace($this->str[$this->last]) |
|
| 341 | 341 | && $delimiterLen < 15 |
| 342 | 342 | ) { |
| 343 | 343 | $this->delimiter .= $this->str[$this->last]; |
@@ -396,8 +396,8 @@ discard block |
||
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | if ( |
| 399 | - ($next->type !== Token::TYPE_KEYWORD || ! in_array($next->value, ['FROM', 'USING'], true)) |
|
| 400 | - && ($next->type !== Token::TYPE_OPERATOR || ! in_array($next->value, [',', ')'], true)) |
|
| 399 | + ($next->type !== Token::TYPE_KEYWORD || !in_array($next->value, ['FROM', 'USING'], true)) |
|
| 400 | + && ($next->type !== Token::TYPE_OPERATOR || !in_array($next->value, [',', ')'], true)) |
|
| 401 | 401 | ) { |
| 402 | 402 | continue; |
| 403 | 403 | } |
@@ -435,10 +435,10 @@ discard block |
||
| 435 | 435 | $next = $this->list->getNext(); |
| 436 | 436 | if ( |
| 437 | 437 | ($next->type !== Token::TYPE_KEYWORD |
| 438 | - || ! in_array($next->value, $this->KEYWORD_NAME_INDICATORS, true) |
|
| 438 | + || !in_array($next->value, $this->KEYWORD_NAME_INDICATORS, true) |
|
| 439 | 439 | ) |
| 440 | 440 | && ($next->type !== Token::TYPE_OPERATOR |
| 441 | - || ! in_array($next->value, $this->OPERATOR_NAME_INDICATORS, true) |
|
| 441 | + || !in_array($next->value, $this->OPERATOR_NAME_INDICATORS, true) |
|
| 442 | 442 | ) |
| 443 | 443 | && ($next->value !== null) |
| 444 | 444 | ) { |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | $token .= $this->str[$this->last]; |
| 522 | 522 | $flags = Context::isKeyword($token); |
| 523 | 523 | |
| 524 | - if (($this->last + 1 !== $this->len && ! Context::isSeparator($this->str[$this->last + 1])) || ! $flags) { |
|
| 524 | + if (($this->last + 1 !== $this->len && !Context::isSeparator($this->str[$this->last + 1])) || !$flags) { |
|
| 525 | 525 | continue; |
| 526 | 526 | } |
| 527 | 527 | |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | $token .= $this->str[$this->last]; |
| 610 | 610 | $flags = Context::isOperator($token); |
| 611 | 611 | |
| 612 | - if (! $flags) { |
|
| 612 | + if (!$flags) { |
|
| 613 | 613 | continue; |
| 614 | 614 | } |
| 615 | 615 | |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | { |
| 632 | 632 | $token = $this->str[$this->last]; |
| 633 | 633 | |
| 634 | - if (! Context::isWhitespace($token)) { |
|
| 634 | + if (!Context::isWhitespace($token)) { |
|
| 635 | 635 | return null; |
| 636 | 636 | } |
| 637 | 637 | |
@@ -871,7 +871,7 @@ discard block |
||
| 871 | 871 | } elseif ($state === 2) { |
| 872 | 872 | $flags |= Token::FLAG_NUMBER_HEX; |
| 873 | 873 | if ( |
| 874 | - ! ( |
|
| 874 | + !( |
|
| 875 | 875 | ($this->str[$this->last] >= '0' && $this->str[$this->last] <= '9') |
| 876 | 876 | || ($this->str[$this->last] >= 'A' && $this->str[$this->last] <= 'F') |
| 877 | 877 | || ($this->str[$this->last] >= 'a' && $this->str[$this->last] <= 'f') |
@@ -974,7 +974,7 @@ discard block |
||
| 974 | 974 | $token = $this->str[$this->last]; |
| 975 | 975 | $flags = Context::isString($token); |
| 976 | 976 | |
| 977 | - if (! $flags && $token !== $quote) { |
|
| 977 | + if (!$flags && $token !== $quote) { |
|
| 978 | 978 | return null; |
| 979 | 979 | } |
| 980 | 980 | |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | $token = $this->str[$this->last]; |
| 1027 | 1027 | $flags = Context::isSymbol($token); |
| 1028 | 1028 | |
| 1029 | - if (! $flags) { |
|
| 1029 | + if (!$flags) { |
|
| 1030 | 1030 | return null; |
| 1031 | 1031 | } |
| 1032 | 1032 | |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | return null; |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | - while (++$this->last < $this->len && ! Context::isSeparator($this->str[$this->last])) { |
|
| 1080 | + while (++$this->last < $this->len && !Context::isSeparator($this->str[$this->last])) { |
|
| 1081 | 1081 | $token .= $this->str[$this->last]; |
| 1082 | 1082 | |
| 1083 | 1083 | // Test if end of token equals the current delimiter. If so, remove it from the token. |