Skip to content

Squiz.Formatting.OperatorBracket autofix incorrect when assignment used with null coalescing operator #3003

@PaulBehrendtVentoro

Description

@PaulBehrendtVentoro

Hi,

We added Squiz.Formatting.OperatorBracket to our ruleset and the autofix operation did this:

-        return $this->gmail
-            ?? $this->gmail = new Google_Service_Gmail($this->google);
+        return ($this->gmail
+            ?? $this->gmail) = new Google_Service_Gmail($this->google);

Using v3.5.5

Thanks for help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions