lint/laravel/prefer-collection-all
In the lint-strict preset. In Rector’s rector-laravel/laravel-collection set. Needs the laravel extension. Unsafe fix: it can change behavior.
What it does
Convert toArray() to all() when the collection does not contain any Arrayable objects.
Configuration
[lint.rules]
"laravel/prefer-collection-all" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ConvertEnumerableToArrayToAll(rector-laravel)