【问题标题】:PHP Depend and @package-annotationsPHP 依赖和@package-annotations
【发布时间】:2010-02-03 18:10:23
【问题描述】:

类似于What's the point of package annotations?,我正在对我们的源代码的一部分运行pdepend,寻找问题。但是,它会吐出以下内容:

The parser doesn't detect package informations within the analyzed project, please check the documentation blocks for @package-annotations or use the --bad-documentation option.

这实际上是什么意思,我该如何解决,在哪里解决?

【问题讨论】:

    标签: php


    【解决方案1】:

    来自PHPDocumentor for the @package annotation的文档

    包用于帮助您对相关元素进行逻辑分组。您编写类来将相关的函数和数据组合在一起,而 phpDocumentor 将文件的内容(函数、定义和包含)表示为“过程页面”。包用于将类和过程页面组合在一起,其方式与目录将相关文件组合在一起的方式相同。

    例如,Zend Framework 中的所有验证器都属于 Zend_Validate 包,因为从概念上讲,它们就是这样。当 PHPDocumentor 创建文档时,您可以浏览到 Zend_Validate 包并查看其中的所有具体验证器类。

    PHPDepend 显然希望您使用注释来创建正确的文档(因此可以选择使用--bad-documentation)。查看我引用的页面以了解如何使用注释。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-12
      • 2023-01-19
      • 2013-06-02
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 2017-03-06
      • 2021-07-05
      相关资源
      最近更新 更多