[eclass] Avoid code duplication as per review from pesa.
[eclass] Move inherit inside inherit-once conditional as per review from pesa.
[eclass] Remove colon for consistency with other case statements.
[eclass] Use non-deprecated switch with identical behaviour as per review from pesa.