Hướng dẫn what are phpdoc comments?
For documentation comments, PhpStorm provides completion that is enabled by default. PhpStorm creates stubs of PHPDoc blocks when you type the Show Nội dung chính
If you need additional PHP-specific tags, PhpStorm provides code completion that suggests the tag names that are relevant in the current context. If a certain tag has multiple values, code completion provides a list of available values. In PHPDoc comments, PhpStorm supports formatting options in compliance with the ZEND, PEAR, and other coding standards. PHPDoc comments in your source code are available for Quick Documentation Lookup, which helps you get quick information for any documented symbol. You can open them for review in the Documentation tool window by pressing Ctrl+Q.
Generate a PHPDoc block for a code construct
PhpStorm analyzes the appointed code construct, extracts the data for parameters, return values, variables, or fields where possible, and on this basis generates a stub of a documentation block. If necessary, you can fill in the missing information.
You can configure the appearance of PHPDoc comments, the presentation of class names, and the default tags sorting order. Note that the tag for properties is no longer configurable, the default @var tag is inserted automatically. See https://github.com/phpDocumentor/fig-standards/pull/55 for details.
Using PHPDoc code inspectionsPhpStorm 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. Enable or disable a PHPDoc inspection
Last modified: 01 August 2022 |