开发者

PHP Depend and @package-annotations

Similar to What's the point of package annotations?, I'm running pdepend against a section of our source code, looking for problems. However, it spits out the following:

The parser doesn't detect package informations wi开发者_开发技巧thin the analyzed project, please check the documentation blocks for @package-annotations or use the --bad-documentation option.

What does this actually mean, how do I fix it, and where?


From the documentation of PHPDocumentor for the @package annotation

Packages are used to help you logically group related elements. You write classes to group related functions and data together, and phpDocumentor represents the contents of files (functions, defines, and includes) as "Procedural Pages." A package is used to group classes and procedural pages together in the same manner that a directory groups related files together.

For instance, all the validators in Zend Framework belong to the package Zend_Validate, because conceptually, they are just that. When PHPDocumentor creates the documentation, you could browse to the package Zend_Validate and see all concrete validator classes therein.

PHPDepend apparently wants you to use the annotation to create proper documentation (hence theoption to use --bad-documentation). Check the page I've quoted to see how to use the annotations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜