Skip to content

PHP tokenizer: add missing verbose message#2903

Merged
gsherwood merged 1 commit intosquizlabs:masterfrom
jrfnl:feature/php-tokenizer-add-missing-verbose-msg
Mar 16, 2020
Merged

PHP tokenizer: add missing verbose message#2903
gsherwood merged 1 commit intosquizlabs:masterfrom
jrfnl:feature/php-tokenizer-add-missing-verbose-msg

Conversation

@jrfnl
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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