PhpStorm
 
Get PhpStorm

Inline

Last modified: 04 December 2024

PhpStorm provides the following inline refactorings:

  • The Inline Constant refactoring replaces redundant constant usage with its initializer. This refactoring is opposite to Extract constant.

    You can opt to do any of the following:

    • Inline all occurrences of the constant, and delete the constant,

    • Inline all occurrences of the constant, and keep the constant,

    • Inline a single occurrence, and keep the constant.

  • The Inline Variable refactoring replaces redundant variable usage with its initializer. This refactoring is opposite to Extract/Introduce variable.

  • The Inline Method refactoring results in placing the method's or function's body into the body of its caller(s). This refactoring is opposite to Extract method.

    You can opt to do any of the following:

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

    • Inline all occurrences of the method, and keep the method,

    • Inline a single occurrence, and keep the method.