Note: These instructions were written for PHPStorm 2018.1, and may need to be adjusted for other versions.
Setting up inspections
PHPStorm includes many built-in inspections for PHP. You can enable or disable each inspection individually in the user interface. Most of the inspections make sense in the context of Drupal projects, but not all.
To ensure consistent validation across all environments on your project, it s better to disable PHPStorm's built-in inspections and instead delegate code sniffing to Coder and PHPCodeSniffer. Use the phpcs.xml rule sets that you distribute with your project (and that BLT provides by default).
To do this, complete the following steps:
Open PHPStorm, and in its main menu, go to PHPStorm > Preferences.
Go to Languages & Frameworks > PHP > Code Sniffer.
Open the window next to Configuration, and then select the PHPCS binary in your project that is located at vendor/bin/phpcs.
Go to Editor > Inspections.
Clear the PHP check box to disable all PHP inspections.
Select the Undefined > Undefined variable analysis check box (as Coder 2 doesn't support this).