lint/operators/prefer-coalesce-assign-over-fallback
In the modernize set. Safe fix where types prove it, unsafe otherwise.
What it does
Suggests the null coalescing assignment operator (??=) when the right operand of ?? assigns to the same variable or property as its left operand.
Configuration
[lint.rules]
"operators/prefer-coalesce-assign-over-fallback" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
prefer-null-coalescing-assignment(mago-linter)