Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP tokenizer: add missing verbose message #2903

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Mar 14, 2020

PR #2860 made a change to the tokenizer which changes the token type of an fn keyword (back) to T_STRING if it turns out not to be an arrow function.

That change did not include a verbose message for tokenizer debugging. Fixed now.

PR 2860 made a change to the tokenizer which changes the token type of an `fn` keyword (back) to `T_STRING` if it turns out not to be an arrow function.

That change did not include a verbose message for tokenizer debugging. Fixed now.
@gsherwood gsherwood added this to the 3.5.5 milestone Mar 16, 2020
gsherwood added a commit that referenced this pull request Mar 16, 2020
@gsherwood gsherwood merged commit cf81a2c into squizlabs:master Mar 16, 2020
@gsherwood
Copy link
Member

Thanks. I was working in this part of the file but didn't notice this was missing.

I ended up changing the message to be similar to the "positive" case. It was also printing out the internal PHPCS_T_FN token name, but I've hard coded that as T_FN because $i is always T_FN in this condition, unless I've read that wrong.

@jrfnl jrfnl deleted the feature/php-tokenizer-add-missing-verbose-msg branch March 17, 2020 02:37
@jrfnl
Copy link
Contributor Author

jrfnl commented Mar 17, 2020

Sounds good. I just realized at some point I'd not added that message and that it would probably be useful, so glad it's in the codebase now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants