How to document a file using PHPDoc

h3. Documenting the file

If the first DocBlock in a file contains a *@package* tag,* it will be used to document the file, except when it immediately preceds a class declaration.

This is a file description:
<?php
/**
 * my description
 * @package foo
 */
define('foo','foo');

This is not a file description:
<?php
/**
 * this is a file description
 * @package foo
 */
class foo{

Neither is this:
<?php
/**
 * this is a file description
 * without @package
 */
... some code ...

No comments:

Post a Comment