On this page:
Code Sniffer Page
The page is available only when the PHP plugin is enabled. The plugin is bundled with PhpStorm and activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.
On this page, choose the Code Sniffer script to use.
Code Sniffer Dialog
Use this dialog box to configure local Code Sniffer scripts, scripts associated with remote PHP interpreters, see Using PHP Code Sniffer Tool, and configure Code Sniffer's behaviour.
The left-hand pane of the dialog box shows all the configured Code Sniffer scripts, one of them is of the type Local, and others are named after the remote PHP interpreters with which the scripts are associated. When you select a configuration, the right-hand pane shows its details.
To configure or edit the Local script, select Local
and specify the location of
phpcsin the PHP Code Sniffer path field.
To configure a new script associated with a remote PHP interpreter:
- Click on the toolbar.
In the Code Sniffer by Remote Interpreter dialog box that opens, choose the remote PHP interpreter to use the associated script from.
If the list does not contain a relevant interpreter, click
and configure a remote interpreter in the Interpreters dialog box
as described in Configuring Remote PHP Interpreters.
When you click OK, PhpStorm brings you back to the Code Sniffer dialog box where the new Code Sniffer configuration is added to the list and the right-hand pane shows the chosen remote PHP interpreter, the path to the Code Sniffer associated with it, and the advanced PHP Code Sniffer options.