is_token_namespaced() doesn't take into account __NAMESPACE__ concatenation
Opened this issue ยท 1 comments
rebeccahum commented
๐ When using the helper function is_token_namespaced()
, it doesn't appear to pick up when the magic constant of __NAMESPACE__
is being concatenated:
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
.
Please let me know if I can provide any additional information!
jrfnl commented
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.