<!-- Before reporting a sniff related bug, please check the error code using `phpcs -s`. If the error code starts with anything other than `Generic`, `MySource`, `PEAR`, `PSR1`, `PSR2`, `PSR12`, `Squiz` or `Zend`, the error is likely coming from an external PHP_CodeSniffer standard. Please report bugs for externally maintained sniffs to the appropriate external standard repository (not here). --> ## 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 ```php 'test' => $foo->prop ?? 'test_' . $bar, ``` becomes ```php 'test' => ($foo->prop ?? 'test_') . $bar, ``` although it should have become ```php 'test' => ($foo->prop ?? 'test_' . $bar), ``` if I'm not completely mistaken ### To reproduce Steps to reproduce the behavior: 1. Create a file called `test.php` with the code sample above 2. Run the autofixer 3. Verify that you get changed behavior in the changed code. ## Versions (please complete the following information) | | | |-|-| | Operating System | Windows 10] | PHP version | 7.4.3 | PHP_CodeSniffer version | [e.g., 3.5.5, master] | Standard | Squiz] ## Additional context Add any other context about the problem here. ## Please confirm: - [x] I have searched the issue list and am not opening a duplicate issue. - [x] I confirm that this bug is a bug in PHP_CodeSniffer and not in one of the external standards. - [x] I have verified the issue still exists in the `master` branch of PHP_CodeSniffer.