You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ccbb46
Browse filesBrowse the repository at this point in the historyBrowse files
[CodeQuality] Preserve parentheses around low-precedence operands in LogicalToBooleanRector (#8155)
Fixesrectorphp/rector#9800
Boolean operators (&& ||) bind tighter than logical ones (and or). When
LogicalToBooleanRector swaps them, operands whose top operator has lower
precedence (ternary, elvis, +=/??=, print, yield, yield from) lost their
parentheses on reprint, changing semantics. Reprint those operands so the
pretty-printer re-adds the parentheses; yield <value> additionally needs
them forced, as the format-preserving printer drops them.
0 commit comments