いくつかのレガシー コードにコメントを入れていますが、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
* @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;
}
コマンドラインから PHPDocumentor を実行すると、ドキュメントでいっぱいの素敵なフォルダーが作成されます。
ドキュメントは問題ないように見えますが、次の行に沿って PHPDocumentor コンパイル エラーが発生します。
Argument $id is missing from the Docblock of __construct
それはPHPDocumenatorが不必要に泣き言を言っているだけですか、それとも私が見逃している明らかなものがありますか?