Change Signature Dialog
Use the Change Signature dialog to perform the Change Signature refactoring in the PHP context.
Use the available controls to make changes to the function signature. Specify how the function calls should be handled. Optionally, select the calling functions that the added parameters and exceptions (if any) should be propagated to.
Click Refactor to perform the refactoring right away. Click Preview to see the potential changes prior to actually performing the refactoring. (These will be shown in the Find tool window.)
|Visibility||Select the method visibility scope (access level modifier) from the list.|
|Name||Use this field to modify the function name.|
|Parameters||See the description of the Parameters area.|
|Signature Preview||In this area, the current function signature is shown. (The information in this area is synchronized with the changes you are making to the function signature.)|
Use the Parameters area to manage the function parameters.
The available controls let you add new parameters, remove the existing ones, reorder the parameters and also propagate new parameters to the calling functions (see the descriptions that follow).
In addition to that, you can change the names of the existing parameters.
To start editing a parameter, just click it. Alternatively, use the Up and Down arrow keys to move to the parameter of interest and Enter to start modifying it.
|Item||Tooltip and shortcut||Description|
Use this icon or shortcut to start adding a new parameter.
Specify the name and default value in the corresponding fields. (The default parameter value is the value (or the expression) to be passed to the function in the function calls.)
You can also propagate the parameters you have added to the calling functions.
|Use this icon or shortcut to delete the selected parameter.|
|Use this icon or shortcut to move the selected parameter one line up in the list of parameters.|
|Use this icon or shortcut to move the selected parameter one line down in the list of parameters.|
Use this icon or shortcut to propagate the added parameters to the calling functions.
You can propagate the changes made to the function parameters to any function that directly or indirectly calls the function whose signature you are changing.
(There may be the functions that call the current function. These, in their turn, may be called by other functions. You can propagate the changes to any of the methods in such sequences.)
In the dialog that opens, select the functions you want the changes to be propagated to.
Note that only the selected calling functions and the function calls within them will be affected. That is, the default values will be added into other function calls.