PhpStorm 2020.1 Help

Quality Tools

File | Settings | Languages and Frameworks | PHP | Quality Tools for Windows and Linux
PhpStorm | Preferences | Languages and Frameworks | PHP | Quality Tools for macOS
Ctrl+Alt+S the Settings button

The page is available only when the PHP plugin is enabled. The plugin is activated by default. If the plugin is disabled, enable it on the Plugins page as described in Manage plugins.

PHP_CodeSniffer

In this section, choose the PHP_CodeSniffer script to use.

Item Description
Configuration Choose the code quality tool script:
  • To use the script associated with a specific remote PHP interpreter, choose the name of this interpreter.

  • To use a local script, choose Local. In this case the local code quality tool will be executed no matter which PHP interpreter - local or remote - is used in the project. Note that there can be only one Local configuration for code quality tool because PhpStorm runs a script (script.bat for Windows or script for Linux and macOS) that contains a path to a PHP engine.

  • To use the script associated with the default project interpreter, that is, the one chosen on the PHP page of the Settings/Preferences dialog, choose By default project interpreter.

Ignored files

Click to open the tool ignored files dialog, which lists the files that tool skips. PhpStorm suggests adding a new file to the list during inspection when waiting for response from the tool exceeds the limit specified in the Tool process timeout field. This is done to prevent slowing down processing. For each file, PhpStorm displays its name and location.

  • To add a file, click the Add button and locate the desired file in the dialog that opens.

  • To delete a file from the list and have tool process it again, select the file and click the Remove file button the Remove button.

  • To remove all the files from the list, click the Close button .

PHP_CodeSniffer Dialog

The dialog opens when you click the Browse button next to the Configuration list on the PHP_CodeSniffer page.

Use this dialog to configure local PHP_CodeSniffer scripts or scripts associated with remote PHP interpreters as well as configure PHP_CodeSniffer's behaviour. See PHP_CodeSniffer for details.

ItemDescription
tool (script) Path

In this field, specify the location of the tool script: script_bat for Windows or script for Linux and macOS.

If the script is associated with a PHP interpreter, PhpStorm detects the path to it and fills in the field automatically, but you can edit it if necessary. Type the path manually or click the Browse button and select the path in the dialog that opens.

To check that the specified path to script.bat or script ensures interaction between PhpStorm and tool, that is, the tool can be launched from PhpStorm and PhpStorm will receive problem reports from it, click the Validate button. This validation is equal to running the script --version command. If validation passes successfully, PhpStorm displays the information on the detected tool version.

Interpreter The field shows the chosen PHP interpreter to use the tool from.
Maximum number of messages per file In this field, set the upper limit for the total number of messages to be reported for a file. All the messages above this limit will be rejected. PhpStorm will display the following warning in the code: Too many tool messages and suggest adding the file to the Ignored files list.
Tool process timeout In this field, specify how long you want PhpStorm to wait for a result from tool. If the timeout is exceeded, the process is killed to prevent excessive CPU and memory usage. This lets you fine tune the tool process behavior depending on the configuration of your computer and the rule sets used.
PHP Code Beautifier and Fixer Settings In this area, provide the path to the PHP Code Beautifier and Fixer tool in the Path to phpcbf field. Type the path manually or click the Browse button and select the path in the dialog that opens.

PHP Mess Detector

In this section, choose the Mess Detector script to use.

Item Description
Configuration Choose the code quality tool script:
  • To use the script associated with a specific remote PHP interpreter, choose the name of this interpreter.

  • To use a local script, choose Local. In this case the local code quality tool will be executed no matter which PHP interpreter - local or remote - is used in the project. Note that there can be only one Local configuration for code quality tool because PhpStorm runs a script (script.bat for Windows or script for Linux and macOS) that contains a path to a PHP engine.

  • To use the script associated with the default project interpreter, that is, the one chosen on the PHP page of the Settings/Preferences dialog, choose By default project interpreter.

Ignored files

Click to open the tool ignored files dialog, which lists the files that tool skips. PhpStorm suggests adding a new file to the list during inspection when waiting for response from the tool exceeds the limit specified in the Tool process timeout field. This is done to prevent slowing down processing. For each file, PhpStorm displays its name and location.

  • To add a file, click the Add button and locate the desired file in the dialog that opens.

  • To delete a file from the list and have tool process it again, select the file and click the Remove file button the Remove button.

  • To remove all the files from the list, click the Close button .

Mess Detector Dialog

The dialog opens when you click the Browse button next to the Configuration list on the Mess Detector page.

Use this dialog to configure local Mess Detector scripts or scripts associated with remote PHP interpreters as well as configure Mess Detector's behaviour. See PHP Mess Detector for details.

ItemDescription
tool (script) Path

In this field, specify the location of the tool script: script_bat for Windows or script for Linux and macOS.

If the script is associated with a PHP interpreter, PhpStorm detects the path to it and fills in the field automatically, but you can edit it if necessary. Type the path manually or click the Browse button and select the path in the dialog that opens.

To check that the specified path to script.bat or script ensures interaction between PhpStorm and tool, that is, the tool can be launched from PhpStorm and PhpStorm will receive problem reports from it, click the Validate button. This validation is equal to running the script --version command. If validation passes successfully, PhpStorm displays the information on the detected tool version.

Interpreter The field shows the chosen PHP interpreter to use the tool from.
Maximum number of messages per file In this field, set the upper limit for the total number of messages to be reported for a file. All the messages above this limit will be rejected. PhpStorm will display the following warning in the code: Too many tool messages and suggest adding the file to the Ignored files list.
Tool process timeout In this field, specify how long you want PhpStorm to wait for a result from tool. If the timeout is exceeded, the process is killed to prevent excessive CPU and memory usage. This lets you fine tune the tool process behavior depending on the configuration of your computer and the rule sets used.

PHP CS Fixer

In this section, choose the PHP CS Fixer script to use.

Item Description
Configuration Choose the code quality tool script:
  • To use the script associated with a specific remote PHP interpreter, choose the name of this interpreter.

  • To use a local script, choose Local. In this case the local code quality tool will be executed no matter which PHP interpreter - local or remote - is used in the project. Note that there can be only one Local configuration for code quality tool because PhpStorm runs a script (script.bat for Windows or script for Linux and macOS) that contains a path to a PHP engine.

  • To use the script associated with the default project interpreter, that is, the one chosen on the PHP page of the Settings/Preferences dialog, choose By default project interpreter.

Ignored files

Click to open the tool ignored files dialog, which lists the files that tool skips. PhpStorm suggests adding a new file to the list during inspection when waiting for response from the tool exceeds the limit specified in the Tool process timeout field. This is done to prevent slowing down processing. For each file, PhpStorm displays its name and location.

  • To add a file, click the Add button and locate the desired file in the dialog that opens.

  • To delete a file from the list and have tool process it again, select the file and click the Remove file button the Remove button.

  • To remove all the files from the list, click the Close button .

PHP CS Fixer Dialog

The dialog opens when you click the Browse button next to the Configuration list on the PHP CS Fixer page.

Use this dialog to configure local PHP CS Fixer scripts or scripts associated with remote PHP interpreters as well as configure PHP CS Fixer's behaviour. See PHP CS Fixer for details.

ItemDescription
tool (script) Path

In this field, specify the location of the tool script: script_bat for Windows or script for Linux and macOS.

If the script is associated with a PHP interpreter, PhpStorm detects the path to it and fills in the field automatically, but you can edit it if necessary. Type the path manually or click the Browse button and select the path in the dialog that opens.

To check that the specified path to script.bat or script ensures interaction between PhpStorm and tool, that is, the tool can be launched from PhpStorm and PhpStorm will receive problem reports from it, click the Validate button. This validation is equal to running the script --version command. If validation passes successfully, PhpStorm displays the information on the detected tool version.

Interpreter The field shows the chosen PHP interpreter to use the tool from.
Maximum number of messages per file In this field, set the upper limit for the total number of messages to be reported for a file. All the messages above this limit will be rejected. PhpStorm will display the following warning in the code: Too many tool messages and suggest adding the file to the Ignored files list.
Tool process timeout In this field, specify how long you want PhpStorm to wait for a result from tool. If the timeout is exceeded, the process is killed to prevent excessive CPU and memory usage. This lets you fine tune the tool process behavior depending on the configuration of your computer and the rule sets used.
Last modified: 26 May 2020