Basics

IntelliJ IDEA creates stubs of PHPDoc blocks
on typing the opening tag /** and pressing Enter or pressing Alt+Insert and appointing the method.function to document.

If this feature is applied to a method or a function,
@param,
@throws, @return, and @var tags are created.
In any other places IntelliJ IDEA adds an empty documentation stub.

If you need additional PHP-specific tags,
IntelliJ IDEA provides code completion that suggests tag names that are relevant in the current context.
If a certain tag has multiple values, the same code completion provides a list of available values.

In PHPDoc comments, IntelliJ IDEA supports formatting options in compliance with ZEND, PEAR, and other standards.

PHPDoc comments in your source code are available for the
Quick Documentation Lookup
feature and open for review on pressing Ctrl+Q.

IntelliJ IDEA analyzes the appointed method or function, where possible extracts the data for method parameters, return values, variables, etc.,
and on this basis generates a stub of a documentation block.

Describe the listed parameters and return values, where necessary.

IntelliJ IDEA
checks syntax in the comments and treats
it according to the
PHP Inspections
settings.

Creating tags in a PHPDoc comment block

IntelliJ IDEA analyzes the appointed method or function, where possible extracts the data for method parameters, return values, variables, etc.,
and on this basis generates a stub of a documentation block.
If necessary, you can fill in the missing information.

In a PHPDoc block, select the desired empty line and press Ctrl+Space.

Select the relevant tag from the suggestion list.

If the entered tag has several values, press Ctrl+Space and select the desired value from the suggestion list.

Inspecting PHPDoc comments

IntelliJ IDEA provides a set of predefined code inspections targeted at PHPDoc blocks. These inspections check whether classes, methods, functions, variables, and constants
are supplied with a PHPDoc comment and whether the tags in the comment match the documented item.

To enable or disable an inspection:

Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or
IntelliJ IDEA | Preferences for OS X,
and
click Inspections under Editor.

On the Inspections page that opens, expand the PHPDoc node under the PHP node. The list of predefined inspections is displayed.

To enable or disable an inspection, select or clear the check box next to it.

To have IntelliJ IDEA check that PHPDoc comments are provided for all code constructs of a certain type:

Select the check box next to the Missing PHPDoc Comment inspection.

In the Options area, select the check boxes next to the required code construct type: class, method, function, variable, or constant.

To suppress reporting a Missing PHPDoc Comment error if a method or function does not contain any parameters and/or return values,
select the Skip if empty.