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
The autofixer fixes the Squiz.Formatting.OperatorBracket.MissingBrackets in a specific case with the ?? operator by malrforming the existing logic:
Squiz.Formatting.OperatorBracket.MissingBrackets
??
Instead of bracketing the whole statement, it brackets part of it, thus changing the behavior of the affecting line
'test' => $foo->prop ?? 'test_' . $bar,
becomes
'test' => ($foo->prop ?? 'test_') . $bar,
although it should have become
'test' => ($foo->prop ?? 'test_' . $bar),
if I'm not completely mistaken
Steps to reproduce the behavior:
test.php
Add any other context about the problem here.
master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The autofixer fixes the
Squiz.Formatting.OperatorBracket.MissingBrackets
in a specific case with the??
operator by malrforming the existing logic:Instead of bracketing the whole statement, it brackets part of it, thus changing the behavior of the affecting line
Code sample
becomes
although it should have become
if I'm not completely mistaken
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample aboveVersions (please complete the following information)
Additional context
Add any other context about the problem here.
Please confirm:
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: