PhpStorm 2021.1 Help

Inline Method

Refactor | Inline

Inline Method refactoring places method's body into the body of its caller(s). You have the option to:

  • inline all occurrences of the method, and delete the method

  • inline all occurrences of the method, and retain the method

  • inline only a single occurrence, and retain the method

ItemDescription
Inline all and remove the methodSelect this option to replace all the method calls with its code and remove the method.
Inline all and keep the methodSelect this option to replace all the method calls with its code and keep the method intact.
Inline this only and keep the methodSelect this option to replace only the current method call.
PreviewClick this button to see the expected changes prior to actually performing the refactoring.
RefactorClick this button to perform the refactoring right away.
Last modified: 08 March 2021