PhpStorm 6.0.1 Web Help

3.0+

PhpStorm creates stubs of PHPDoc blocks on typing the opening tag /** and pressing EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.

If this feature is applied to a method or a function, @param, @access, @static, @throws, and @abstract tags are created. In any other places PhpStorm adds an empty documentation stub.

If you need additional PHP-specific tags, PhpStorm 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, PhpStorm supports the following formatting options in compliance with ZEND, PEAR, and other standards:

Note

PHPDoc comments in your source code are available for the Quick Documentation Lookup feature and open for review on pressing Ctrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Alt+Button2 ClickCtrl+Q or Shift+F1Ctrl+Q or Alt+Button2 ClickAlt+Button2 Click, Ctrl+Shift+Space or F2Control J or Control Button2 ClickControl J or Control Button2 ClickAlt Button2 Click or F2.

To enable or disable automatic creation of documentation comments
  1. Open the Settings dialog box and navigate to the Editor. Smart Keys page.
  2. In the Enter section, select or clear Insert documentation comment stub check box.
To create a PHPDoc block for a method or a function
  1. Place the caret before the method or function declaration.
  2. Type the opening block comment /** and press EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.
  3. Describe the listed parameters and return values.

    Tip

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

To create tags in a PHPDoc comment block
  1. In a PHPDoc block, select the desired empty line and press Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space.
  2. Select the relevant tag from the suggestion list.
  3. If the entered tag has several values, press Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space and select the desired value from the suggestion list.

See Also

Procedures:

Reference:

Web Resources: