summaryrefslogtreecommitdiff
path: root/vendor/symfony/expression-language/Lexer.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-08-04 17:45:34 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-08-04 17:45:34 +0100
commit69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c (patch)
treef2ab9b134d7c24f79c4fa66f581cc6387e1938ed /vendor/symfony/expression-language/Lexer.php
parentd69397b0fb0a7e71220076299d45dc2ac034b754 (diff)
downloadwebtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.tar.gz
webtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.tar.bz2
webtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/expression-language/Lexer.php')
-rw-r--r--vendor/symfony/expression-language/Lexer.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/symfony/expression-language/Lexer.php b/vendor/symfony/expression-language/Lexer.php
index aeeda8a856..bd54e8913a 100644
--- a/vendor/symfony/expression-language/Lexer.php
+++ b/vendor/symfony/expression-language/Lexer.php
@@ -33,7 +33,7 @@ class Lexer
$cursor = 0;
$tokens = array();
$brackets = array();
- $end = strlen($expression);
+ $end = \strlen($expression);
while ($cursor < $end) {
if (' ' == $expression[$cursor]) {
@@ -49,7 +49,7 @@ class Lexer
$number = (int) $match[0]; // integers lower than the maximum
}
$tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);
- $cursor += strlen($match[0]);
+ $cursor += \strlen($match[0]);
} elseif (false !== strpos('([{', $expression[$cursor])) {
// opening bracket
$brackets[] = array($expression[$cursor], $cursor);
@@ -72,11 +72,11 @@ class Lexer
} elseif (preg_match('/"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As', $expression, $match, 0, $cursor)) {
// strings
$tokens[] = new Token(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)), $cursor + 1);
- $cursor += strlen($match[0]);
+ $cursor += \strlen($match[0]);
} elseif (preg_match('/not in(?=[\s(])|\!\=\=|not(?=[\s(])|and(?=[\s(])|\=\=\=|\>\=|or(?=[\s(])|\<\=|\*\*|\.\.|in(?=[\s(])|&&|\|\||matches|\=\=|\!\=|\*|~|%|\/|\>|\||\!|\^|&|\+|\<|\-/A', $expression, $match, 0, $cursor)) {
// operators
$tokens[] = new Token(Token::OPERATOR_TYPE, $match[0], $cursor + 1);
- $cursor += strlen($match[0]);
+ $cursor += \strlen($match[0]);
} elseif (false !== strpos('.,?:', $expression[$cursor])) {
// punctuation
$tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
@@ -84,7 +84,7 @@ class Lexer
} elseif (preg_match('/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A', $expression, $match, 0, $cursor)) {
// names
$tokens[] = new Token(Token::NAME_TYPE, $match[0], $cursor + 1);
- $cursor += strlen($match[0]);
+ $cursor += \strlen($match[0]);
} else {
// unlexable
throw new SyntaxError(sprintf('Unexpected character "%s"', $expression[$cursor]), $cursor, $expression);