lint/control-flow/prefer-yield-from
In the lint-recommended preset and every stricter one. Safe fix.
What it does
If the function explicitly returns an array, and has the return type iterable, then yield from must be used instead of return.
Configuration
[lint.rules]
"control-flow/prefer-yield-from" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
return_to_yield_from(php-cs-fixer)