PHP

PhpStorm设置注释模板

Royal
2021-12-06 / 0 评论 / 335 阅读 / 正在检测是否收录...

1. 设置函数注释模板
*设置位置:"File"->"Settings"->"Editor"->"File and Code Templates";
kwug2wwa.png
选择PHP Function Doc Comment 粘贴如下模板代码:

/**
 * Notes:
 * User: ${USER}
 * DateTime: ${DATE} ${TIME}

${PARAM_DOC}
#if (${TYPE_HINT} != "void") * @return ${TYPE_HINT}
#end
${THROWS_DOC}
*/

生成注释,在函数上方输入“/**“,按”enter“键即可出现对应注释内容,如图
kwuggoun.png
2. 设置文档头部注释
选择PHP File Header Comment
3. 设置类注释
选择PHP Class Doc

0

评论

博主关闭了当前页面的评论