PhpStorm 2017.3 Help

Reformat Code on Directory Dialog

Code | Reformat Code
Ctrl+Alt+L


This dialog box appears when you select a Reformat Code action on the directory.

ItemDescription
Directory This is a read-only field that displays the name of the selected directory.
OptionsThis area displays options for your code reformatting.
You can select from the following options:
  • Include subdirectories: select this checkbox to have source code from files in the nested directories reformatted. This checkbox only appears when the nested directories exist.
  • Optimize imports: select this checkbox to remove unused import statements from the code within the selected scope.
  • Rearrange entries: select this checkbox to reorder your source code entries.
  • Only VCS changed text: if this checkbox is selected, then reformatting will apply only to the files that have been changed locally, but not yet checked in to the repository.
    This checkbox is only available for the files under version control.
FiltersThis area displays options for the filters that you can apply to the code reformatting action.
You can select from the following options:
  • Scope: select this checkbox to choose, from the drop-down list, a scope to which you want to apply your reformatting options. If you want to configure a custom scope, click browseButton button to open a Scopes dialog.
  • File mask(s): select this checkbox to choose, from the drop-down list, file extensions to which you want to apply your reformatting options.
RunClick this button to start reformatting the source code within the specified scope.
Last modified: 3 November 2017