私は繰り返し情報に2ブロックのコメントがあるのだろうと思っていました。誰かが答えを知っていますか?Zend Frameworkのコードの書類のスタイル
/**
* 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 [email protected] 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
{
例:@category、@package、@copyright、@license。それらは第1と第2のコメントブロックで2回繰り返されます。
私はコメントのベストプラクティスを探していましたが、コードを分析しながら、この質問を思いつきました。
あまりにも単純すぎると私を責めないでください。
Liyaliありがとうございます。自己のphpdocツールに関する私の知識は貧弱です。これまでのところ、私は自分のコードをIDEでコメントしましたが、そのツールからはコメントしていません。私はそれを見て、それを理解するでしょう。 –
2つのdocblockのこの習慣の発端には、phpDocumentor _requires_ファイルレベルのdocblockとクラスレベルのdocblockがあります。見つからないとクラッシュしませんが、実行時に作成されたerrors.htmlファイルにこの欠落した項目を「エラー」としてリストします。 – ashnazg