1. 文档头部注释
设置 > Editor > File and Code Templates > Includes选项卡 > PHP File Header
/**
* Created by ${PRODUCT_NAME}.
* User: *****
* Date: ${DATE}
* Time: ${TIME}
* PHP version 7
* @category Private
#if (${NAMESPACE})
* @package ${NAMESPACE}
#end
* @author fzy <571157865@qq.com>
* @license FZY https://571157865@qq.com
* @link https://571157865@qq.com
*/
2. 函数头部设置
/**
${PARAM_DOC}
#if (${TYPE_HINT} != "void")
* @return ${TYPE_HINT}
#end
${THROWS_DOC}
*/
例子:
/** * 分页数据 * * @param array $data 参数 * @param int $total 总数 * * @return array 结果 */
3、类注释
/**
* Class ${NAME}
*
* @category Private
#if (${NAMESPACE})
* @package ${NAMESPACE}
#end
* @author fzy <571157865@qq.com>
* @license FZY https://571157865@qq.com
* @link https://571157865@qq.com
*/