3

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 within 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?

Community
  • 1
  • 1
Glen Solsberry
  • 11,960
  • 15
  • 69
  • 94

1 Answers1

2

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.

Gordon
  • 312,688
  • 75
  • 539
  • 559