PhpStorm 2016.2 Help

Rearranging Code Using Arrangement Rules

On this page:

Defining arrangement rules

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or PhpStorm | Preferences for OS X, and click Code Style under Editor.
  2. Under the Code Style node, select the appropriate language.
  3. On the Arrangement tab of the language settings, specify the rules for your code rearrangement and click OK.

Rearranging code

  1. In the editor select a part of the code that you want to rearrange.
  2. On the main menu, choose Code | Rearrange Code.
    Alternatively, in the project tool window, right-click the file where you want to perform the code rearranging, select Code | Reformat Code.
  3. In the dialog that opens, select Rearrange entries check box and click OK.

See Also


Last modified: 24 November 2016