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

Wrong token type for backslash in use function #1547

Closed
michalbundyra opened this issue Jul 6, 2017 · 1 comment
Closed

Wrong token type for backslash in use function #1547

michalbundyra opened this issue Jul 6, 2017 · 1 comment
Milestone

Comments

@michalbundyra
Copy link
Contributor

In case:

use function \array_keys

backslash is tokenized as T_STRING.

In case:

use function \MyNamespace\myFunction;

first backslash is tokenzed as T_STRING and the second one as T_NS_SEPARATOR.


If we import class:

use \DateTime;

or global constant:

use const \PHP_VERSION_ID;

or constant from other namespace:

use const \MyNamespace\MY_CONST;

all backslashes are tokenized as T_NS_SEPARATOR.


I would expect then the same behaviour for importing functions, so all backlashes should be there always tokenized as T_NS_SEPARATOR.

@gsherwood
Copy link
Member

Fixed via PR #1548

kukulich added a commit to slevomat/coding-standard that referenced this issue Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants