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

Null coalescing operator detected as arithmetic operation #7

Open
dmolineus opened this issue Dec 20, 2018 · 2 comments
Open

Null coalescing operator detected as arithmetic operation #7

dmolineus opened this issue Dec 20, 2018 · 2 comments

Comments

@dmolineus
Copy link
Contributor

I'm not sure if it's an issue of phpcq or the php code sniffer. I often run into the issue that the null coalescing operator ?? is detected as arithmetic operation and so the usage of brackets are forced.

The ternary operator ?: instead isn't detected as arithmetic operation.

@discordier
Copy link
Member

This seems to be an issue in phpcs itself. The coresponding sniff is not changed by us.

@dmolineus
Copy link
Contributor Author

I opened an issue (squizlabs/PHP_CodeSniffer#2325) for it.

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

No branches or pull requests

2 participants