有没有一种方法可以在phpDoc的@method签名中将参数标记为可选的? 就像这样: /* * @method bool alloc() alloc(int $filesize [, string &$result]) Allocates space for a file to be uploaded */
通常情况下,phpDocumentor 通过查看方法签名中参数的默认值来识别可选参数。因此,以您的示例为例:@method bool alloc() alloc(int $filesize, string &$result = '') Allocates space for ...