Declaring multiple variables for phpdoc without running each of them / **

I have objects with many variables that I declare and explain in the comments. I comment very carefully for further processing using phpDoc, however I have no experience with actual documentation compilation.

I find it very annoying that with phpDoc notation, each variable is powered by four to six lines of code, even if the only attribute I want to set is a description:

/**
 * @desc this is the description
 */

 var $variable = null;

I would like to use the following notation:

# @desc this is the description
var $variable = null;

Is there an easy way to configure phpDoc to accept this, or can it cause me problems when I actually try to compile the documentation? I don’t need a setting right now (although it is, of course, appreciated), just an expression from someone who knows phpDoc whether this is possible without redoing large parts of my code.

+3
source share
2 answers

Just write single line docblocks

/** @desc this is the description */
var $variable = null;

The problem is resolved.

+12
source

In addition to what Frank Farmer mentioned (+1 to his decision),

/**is declared as T_DOC_COMMENTin the PHP tokenizer with PHP 5. This means that all documentation notations are processed from /**to */.

# /* PHP.

:

http://www.php.net/manual/en/tokens.php

+2

Source: https://habr.com/ru/post/1721834/


All Articles