Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 452 Bytes

File metadata and controls

19 lines (17 loc) · 452 Bytes

Parameterize Function

formelyL Parameterize Method

Why?

  • You have two functions that carry out very similar logic with different literal values. Remove the duplication by using a single function with parameters forthe different values.

Benefits:

  • The name is clear readable, understandable and easy to maintain.

What?

How?

Sample

Before

After refactoring