I was wondering why there’s two blocks of comments with repeated information. Does someone knows the answer?
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Controller
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Action.php 23775 2011-03-01 17:25:24Z ralph $
*/
/**
* @see Zend_Controller_Action_HelperBroker
*/
require_once 'Zend/Controller/Action/HelperBroker.php';
/**
* @see Zend_Controller_Action_Interface
*/
require_once 'Zend/Controller/Action/Interface.php';
/**
* @see Zend_Controller_Front
*/
require_once 'Zend/Controller/Front.php';
/**
* @category Zend
* @package Zend_Controller
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Controller_Action implements Zend_Controller_Action_Interface
{
For example: @category, @package, @copyright, @license. Those repeat twice on the first and second comment block.
I was looking for the commenting best practices and while analyzing their code, I’ve came up with this question.
Please, do not blame me if it’s too much simple.
Zend Framework use phpDocumentator to render their Technical Documentation.
The behavior you noticed is how phpDocumentator reads a file and parse it, there are two ways a @package tag can be parsed:
A @license and @copyright page can be associated to any element (include, page, define, method, variable, etc)
A good resource in order to realize a great documentation is the phpDoc official manual.