lint/style/prefer-compound-assignment
In the lint-strict preset. In Rector’s rector/code-quality set. Unsafe fix: it can change behavior.
What it does
Shorthand notation for operators should be used if possible.
Configuration
[lint.rules]
"style/prefer-compound-assignment" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
long_to_shorthand_operator(php-cs-fixer, risky)CombinedAssign(rector)use-compound-assignment(mago-linter)
Merged rules
These old IDs are now this rule. A config that still names one stops with an error. See merged rules.
lint/operators/prefer-shorthand-operator