Skip to content

Commit

Permalink
Replace broken magic number with constant
Browse files Browse the repository at this point in the history
PHP's parser token constants are dynamically generated,
values can change from version to version.
See: https://www.php.net/manual/en/tokens.php
  • Loading branch information
wedi committed Nov 18, 2020
1 parent f6a0a38 commit 3c30480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/generate_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function help($name) {
}

foreach(token_get_all($file_content) as $token) {
if ($token[0] != 319) {
if ($token[0] !== T_STRING) {
continue;
}

Expand Down

0 comments on commit 3c30480

Please sign in to comment.