File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
27
27
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
28
28
<notes>
29
29
- The PHP 7.4 numeric separator backfill now works correctly for more float formats
30
+ - The PHP 7.4 numeric separator backfill is no longer run on PHP versions 7.4.0 or greater
30
31
- Fixed bug #2688 : Case statements not tokenized correctly when switch is contained within ternary
31
32
- Fixed bug #2698 : PHPCS throws errors determining auto report width when shell_exec is disabled
32
33
-- Thanks to Matthew Peveler for the patch
Original file line number Diff line number Diff line change @@ -974,13 +974,14 @@ protected function tokenize($string)
974
974
and change these tokens in earlier versions.
975
975
*/
976
976
977
- if ($ tokenIsArray === true
977
+ if (PHP_VERSION_ID < 70400
978
+ && ($ tokenIsArray === true
978
979
&& ($ token [0 ] === T_LNUMBER
979
980
|| $ token [0 ] === T_DNUMBER )
980
981
&& isset ($ tokens [($ stackPtr + 1 )]) === true
981
982
&& is_array ($ tokens [($ stackPtr + 1 )]) === true
982
983
&& $ tokens [($ stackPtr + 1 )][0 ] === T_STRING
983
- && $ tokens [($ stackPtr + 1 )][1 ][0 ] === '_ '
984
+ && $ tokens [($ stackPtr + 1 )][1 ][0 ] === '_ ' )
984
985
) {
985
986
$ newContent = $ token [1 ];
986
987
$ newType = $ token [0 ];
You can’t perform that action at this time.
0 commit comments