Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
node_load_multiple() can be properly refactored by tweaking the existing logic in EntityLoadBase.
I tried improving it by using a protected variable ($isMultiple), defaulting it to FALSE in EntityLoadBase and setting it to TRUE in NodeLoadMultipleRector, as well as updating EntityLoadBase to now use it to determine $method_name, etc. For some reason, that change caused the is_null() check for $this->entityType to start returning TRUE, so I just left those changes out of the PR.
I also ran a quick sanity check by diffing a processed copy of rector_examples/node_load.php vs. the _updated version, which showed no changes at all.