PhpStorm 2021.1 Help

Code Inspection: Undefined class

Produces two types of warnings:

  • Undefined class: the declaration of referenced class is not found in the built-in library and project files.

  • Multiple declarations: multiple class definitions were found in project files. This can lead to issues with code completion, members resolution, and class inheritance analysis.

Use the options below to customize the inspection:
  • Don't report multiple class declaration potential problems: if selected, the inspection will not report classes having multiple definitions in project files.

  • Ignore: if selected, the inspection will not report the undefined classes referenced in PHPDoc blocks.

Suppress an inspection in the editor

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 08 March 2021