Problem/Motivation
Inside of metatag.post_update.php there is a function metatag_post_update_convert_author_data there is an unused else at this point:
if ($sandbox['total_records'] > 0) {
return (string) t('Processed @processed of @total overridden Metatag records.', [
'@processed' => $sandbox['records_processed'],
'@total' => $sandbox['total_records'],
]);
}
else {
return (string) t("There were no overridden Metatag records.");
}
And there is a best practice recommendation to avoid using else if isn't necessary. https://freek.dev/2212-avoid-using-else
Proposed resolution
We can just remove this unnecessary else
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork metatag-3336301
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
renatog commentedMR with that: https://git.drupalcode.org/project/metatag/-/merge_requests/75
Comment #4
damienmckennaA reasonable little improvement, thank you.
Comment #7
damienmckennaCommitted. Thank you.