We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
👋 When using the helper function is_token_namespaced(), it doesn't appear to pick up when the magic constant of __NAMESPACE__ is being concatenated:
is_token_namespaced()
__NAMESPACE__
https://github.com/WordPress/WordPress-Coding-Standards/blob/06966b26d8deb06a91a5c0f99a04802a6ff5e5bf/WordPress/Sniff.php#L1648-L1671
e.g. The below would return false:
__NAMESPACE__ . '\FOO_BAR';
I think we can just add a check if the token is T_NS_C.
T_NS_C
Please let me know if I can provide any additional information!
The text was updated successfully, but these errors were encountered:
The thing with this is that the actual token is not namespaced as constant encapsed text strings are not subject to the concept of namespaces.
__NAMESPACE__ returns a text string after all.
This method is not in this library for now anyway, but I'll have a think about this if/when I decide to add it.
Sorry, something went wrong.
No branches or pull requests
👋 When using the helper function
is_token_namespaced()
, it doesn't appear to pick up when the magic constant of__NAMESPACE__
is being concatenated:https://github.com/WordPress/WordPress-Coding-Standards/blob/06966b26d8deb06a91a5c0f99a04802a6ff5e5bf/WordPress/Sniff.php#L1648-L1671
e.g. The below would return false:
I think we can just add a check if the token is
T_NS_C
.Please let me know if I can provide any additional information!
The text was updated successfully, but these errors were encountered: