Clean code is not about eliminating repeated code. Clean code is about readability. It's a not a rule. It's a programming philosophy.
People set rules but we should always see the reasoning behind the rules instead of just following them blindly.
Personally every time I refactor some piece of code, I think "Does this make code easier to read and understand? Will this save me and my colleagues time in the future?".
People set rules but we should always see the reasoning behind the rules instead of just following them blindly.
Personally every time I refactor some piece of code, I think "Does this make code easier to read and understand? Will this save me and my colleagues time in the future?".