- Open the desired file in the editor. Alternatively select a file or directory in the Project tool window. The inspection scope will be confined to the opened file or the selection.
- On the main menu, choose Specify Inspection Scope dialog box opens. . The
- In the Inspection scope area, specify the inspection scope.
- To have the source code of the entire project inspected, select the Whole Project option.
- To have the source code of currently opened file, or the file/folder selected in the Project view, select the File/Module <name> option.
- To apply inspection to a custom scope, select the Custom scope option, then select one of the pre-defined scopes from the drop-down list or click the Browse button and configure your own scope in the Scopes dialog box.
- To have test source files inspected too, select the Include test sources check box.
- Specify the inspection profile to apply. Do one of the following:
- Select the desired profile from the Inspection Profile drop-down list.
- Click the Browse button and configure your own profile in the Inspections dialog box.
- Click OK.
- Examine inspection results in the Inspection tool window.
Click thumbnail to view larger image.
Each run of an inspection with a certain scope is displayed in its own tab in the tool window. Each group of inspections, for which the problems have been detected, is displayed in the left part of the tab. Click the nodes to review inspection results. Select a specific inspection to see its description in the right pane.
In the Inspection tool window you can:
It is also possible to run inspections offline, without starting the IDE. Follow the procedure described in the section Working with PhpStorm Features from Command Line.