PhpStorm
 
Get PhpStorm

Change signature

Last modified: 28 January 2025

The Change Signature refactoring combines several different modifications that can be applied to a function signature. You can use this refactoring to:

  • change the function name and return type

  • add, remove, and reorder parameters

  • assign default values to the parameters

  • change parameter names and types

  • propagate new parameters through the function call hierarchy

When changing a function signature, PhpStorm searches for all usages of the function and updates all the calls, implementations, and override replacements of the function that can be safely modified to reflect the change.

The Change Signature refactoring is supported only for PHP and JavaScript (refer to Refactoring JavaScript).