Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 456 Bytes

File metadata and controls

20 lines (18 loc) · 456 Bytes

Replace Inline Code with Function Call

Why?

  • You see inline code that is doing the same thing like in existing function.

Benefits:

  • The code is more readable
  • It's more easy to test the existing function.

What?

  • Replace inline code with a call to the existing function.

How?

  • Replace the inline code with a call to the existing function.
  • Test

Sample

Before

After refactoring