IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Psalm

Last modified: 10 August 2022

IntelliJ IDEA provides code quality check through integration with the Psalm tool, which validates your code for consistency against a set of validation rules.

To use Psalm from IntelliJ IDEA instead of command line, you need to register it in IntelliJ IDEA and configure it as a IntelliJ IDEA code inspection. Once installed and enabled in IntelliJ IDEA, the tool is available in any opened PHP file, and no additional steps are required to launch it. The on-the-fly code check is activated upon every update in the file thus making it easy to get rid of discovered problems.

Errors and warnings reported by Psalm on-the-fly are displayed as popup messages. When the tool is run in the batch mode, the errors and warnings are displayed in the Problems tool window. Each message has the psalm prefix to distinguish it from IntelliJ IDEA internal inspections.

Make sure the PHP and Psalm plugins are enabled. The plugins are not bundled with IntelliJ IDEA, but they can be installed on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository. Once enabled, the plugins are available at the IDE level, that is, you can use them in all your IntelliJ IDEA projects.