【问题标题】:@see and @uses tags not showing up with phpDocumentor@see 和 @uses 标签没有显示在 phpDocumentor 中
【发布时间】:2014-06-29 17:16:46
【问题描述】:

我正在使用 phpDocumentor 2.5.0 并且以下标签未显示在文档中(即使一次完成一个):

//None of these work
 * @see MyClass::someFunction()
 * @see MyClass::someFunction() that does something
 * @uses MyClass::someFunction()
 * @uses MyClass::someFunction() to do something
 * @uses MyClass
 * @uses /MyClass
 * @uses /MyClass::someFunction()

如何将这些添加到文档中?

我没有使用命名空间。

我正在像这样运行 phpDocumentor:

phpdoc -d /home/development/code_to_document/ -t /home/development/documentation

【问题讨论】:

    标签: php documentation phpdoc


    【解决方案1】:

    这些行来自什么文档块?只要它是一个真正的文档块: /** * @see MyClass::someFunction() */

    并且 docblock 位于可记录的代码元素(类、方法、函数等)上,那么即使在您的代码项目中既没有找到 MyClass 也没有找到 MyClass::someFunction(),我也希望这些标签会出现。

    如果您的测试代码满足这些要求,那么您可能已经发现了一个错误。我建议至少尝试几个不同的输出模板,看看丢失的标签行为是否持续存在于所有这些模板中。

    【讨论】:

    • 这似乎是一个错误。它确实注意到@see 标签,但从不打印出类和函数。所以它是一个空链接。但如果你这样做,它会“起作用”:@see MyClass::someFunction() MyClass::someFunction() does something。注意我必须做两次。
    • 这可能和这个bug有关——github.com/phpDocumentor/phpDocumentor2/issues/…
    猜你喜欢
    • 2013-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-11
    • 2018-02-14
    相关资源
    最近更新 更多