lint/style/no-array-push
In the code-quality set. Unsafe fix: it can change behaviour.
What it does
Converts simple usages of array_push($x, $y); to $x[] = $y;.
Configuration
[lint.rules]
"style/no-array-push" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
array_push(php-cs-fixer, risky)ChangeArrayPushToArrayAssign(rector)
Merged rules
These old IDs are now this rule. A config that still names one stops with an error. See merged rules.
lint/arrays/prefer-array-append