@@ -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 |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | // For multi-byte strings, a new instance of `UtfString` is |
| 177 | 177 | // initialized (only if `UtfString` usage is forced. |
| 178 | - if (! $str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) { |
|
| 178 | + if (!$str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) { |
|
| 179 | 179 | $str = new UtfString($str); |
| 180 | 180 | } |
| 181 | 181 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $this->strict = $strict; |
| 186 | 186 | |
| 187 | 187 | // Setting the delimiter. |
| 188 | - $this->setDelimiter(! empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER); |
|
| 188 | + $this->setDelimiter(!empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER); |
|
| 189 | 189 | |
| 190 | 190 | $this->lex(); |
| 191 | 191 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | $delimiterLen = 0; |
| 314 | 314 | while ( |
| 315 | 315 | ++$this->last < $this->len |
| 316 | - && ! Context::isWhitespace($this->str[$this->last]) |
|
| 316 | + && !Context::isWhitespace($this->str[$this->last]) |
|
| 317 | 317 | && $delimiterLen < 15 |
| 318 | 318 | ) { |
| 319 | 319 | $this->delimiter .= $this->str[$this->last]; |
@@ -374,8 +374,8 @@ discard block |
||
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | if ( |
| 377 | - ($next->type !== Token::TYPE_KEYWORD || ! in_array($next->value, ['FROM', 'USING'], true)) |
|
| 378 | - && ($next->type !== Token::TYPE_OPERATOR || ! in_array($next->value, [',', ')'], true)) |
|
| 377 | + ($next->type !== Token::TYPE_KEYWORD || !in_array($next->value, ['FROM', 'USING'], true)) |
|
| 378 | + && ($next->type !== Token::TYPE_OPERATOR || !in_array($next->value, [',', ')'], true)) |
|
| 379 | 379 | ) { |
| 380 | 380 | continue; |
| 381 | 381 | } |
@@ -414,8 +414,8 @@ discard block |
||
| 414 | 414 | while (($keywordToken = $this->list->getNextOfTypeAndFlag(Token::TYPE_KEYWORD, $keywordFunction)) !== null) { |
| 415 | 415 | $next = $this->list->getNext(); |
| 416 | 416 | if ( |
| 417 | - ($next->type !== Token::TYPE_KEYWORD || ! in_array($next->value, ['FROM', 'SET', 'WHERE'], true)) |
|
| 418 | - && ($next->type !== Token::TYPE_OPERATOR || ! in_array($next->value, ['.', ','], true)) |
|
| 417 | + ($next->type !== Token::TYPE_KEYWORD || !in_array($next->value, ['FROM', 'SET', 'WHERE'], true)) |
|
| 418 | + && ($next->type !== Token::TYPE_OPERATOR || !in_array($next->value, ['.', ','], true)) |
|
| 419 | 419 | && ($next->value !== null) |
| 420 | 420 | ) { |
| 421 | 421 | continue; |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | $token .= $this->str[$this->last]; |
| 498 | 498 | $flags = Context::isKeyword($token); |
| 499 | 499 | |
| 500 | - if (($this->last + 1 !== $this->len && ! Context::isSeparator($this->str[$this->last + 1])) || ! $flags) { |
|
| 500 | + if (($this->last + 1 !== $this->len && !Context::isSeparator($this->str[$this->last + 1])) || !$flags) { |
|
| 501 | 501 | continue; |
| 502 | 502 | } |
| 503 | 503 | |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | $token .= $this->str[$this->last]; |
| 586 | 586 | $flags = Context::isOperator($token); |
| 587 | 587 | |
| 588 | - if (! $flags) { |
|
| 588 | + if (!$flags) { |
|
| 589 | 589 | continue; |
| 590 | 590 | } |
| 591 | 591 | |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | { |
| 608 | 608 | $token = $this->str[$this->last]; |
| 609 | 609 | |
| 610 | - if (! Context::isWhitespace($token)) { |
|
| 610 | + if (!Context::isWhitespace($token)) { |
|
| 611 | 611 | return null; |
| 612 | 612 | } |
| 613 | 613 | |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | } elseif ($state === 2) { |
| 848 | 848 | $flags |= Token::FLAG_NUMBER_HEX; |
| 849 | 849 | if ( |
| 850 | - ! ( |
|
| 850 | + !( |
|
| 851 | 851 | ($this->str[$this->last] >= '0' && $this->str[$this->last] <= '9') |
| 852 | 852 | || ($this->str[$this->last] >= 'A' && $this->str[$this->last] <= 'F') |
| 853 | 853 | || ($this->str[$this->last] >= 'a' && $this->str[$this->last] <= 'f') |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | $token = $this->str[$this->last]; |
| 951 | 951 | $flags = Context::isString($token); |
| 952 | 952 | |
| 953 | - if (! $flags && $token !== $quote) { |
|
| 953 | + if (!$flags && $token !== $quote) { |
|
| 954 | 954 | return null; |
| 955 | 955 | } |
| 956 | 956 | |
@@ -1002,7 +1002,7 @@ discard block |
||
| 1002 | 1002 | $token = $this->str[$this->last]; |
| 1003 | 1003 | $flags = Context::isSymbol($token); |
| 1004 | 1004 | |
| 1005 | - if (! $flags) { |
|
| 1005 | + if (!$flags) { |
|
| 1006 | 1006 | return null; |
| 1007 | 1007 | } |
| 1008 | 1008 | |
@@ -1053,7 +1053,7 @@ discard block |
||
| 1053 | 1053 | return null; |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | - while (++$this->last < $this->len && ! Context::isSeparator($this->str[$this->last])) { |
|
| 1056 | + while (++$this->last < $this->len && !Context::isSeparator($this->str[$this->last])) { |
|
| 1057 | 1057 | $token .= $this->str[$this->last]; |
| 1058 | 1058 | |
| 1059 | 1059 | // Test if end of token equals the current delimiter. If so, remove it from the token. |