From 17c09333277027a2f377cd975c967d3ef90ccde3 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 11 May 2021 03:23:11 +0200 Subject: [PATCH] PHPCS 4.x | Tokenizer/PHP: defer to predefined regex --- src/Tokenizers/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index e9d16d7137..b489d95cc2 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -1162,7 +1162,7 @@ protected function tokenize($string) if ($tokenIsArray === true && ($token[0] === T_STRING - || preg_match('`^[a-zA-Z_\x80-\xff]`', $token[1]) === 1) + || preg_match(self::PHP_LABEL_REGEX, $token[1]) === 1) ) { // Get the next non-empty token. for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {