2

いくつかのレガシー コードにコメントを入れていますが、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が不必要に泣き言を言っているだけですか、それとも私が見逃している明らかなものがありますか?

4

1 に答える 1

5

phpDocumentor バージョン 2.8.1 でも同じ問題が発生しました。このバージョンのバグのようです: ここにリンクの説明を入力してください

バージョン 2.7.0を使用しましたが、今は問題ありません。

于 2014-12-07T05:01:36.333 に答える