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抱怨不必要,或者是否有一些明显我缺少的东西?
| 归档时间: |
|
| 查看次数: |
1665 次 |
| 最近记录: |