PHPDocumentor - 我的DocBlock出了什么问题?

Dyc*_*cey 2 php phpdoc docblocks

我在一些遗留代码中添加了一些注释,并且我遇到了PHPDocumentor的一个小问题.

这是一个例子:

/**
 * Constructs the Widget object
 * 
 * Basic constructor for the widget object.
 * Another line of pointless explanation, badly worded.
 *
 * @param  string   $id    The ID of the widget
 * @param  int      $size  The Size of the widget
 * @return void
 * @throws InvalidArgumentException
 */
public function __construct($id, $size) {
    if (!is_string($id) || !is_integer($size)) {
        throw new InvalidArgumentException('$id must be a string, $size an integer');
    }
    $this->id = $id;
    $this->size = $size;
}
Run Code Online (Sandbox Code Playgroud)

我从命令行运行PHPDocumentor,并获得一个充满文档的可爱文件夹.

文档看起来很好,但我得到PHPDocumentor编译错误:

Argument $id is missing from the Docblock of __construct
Run Code Online (Sandbox Code Playgroud)

是不是只是PHPDocumenator抱怨不必要,或者是否有一些明显我缺少的东西?

Ehs*_*san 5

我在phpDocumentor版本2.8.1中遇到了同样的问题.这似乎是这个版本中的一个错误: 在这里输入链接描述

我使用的是2.7.0版本,现在很好.