1. 文档头部注释
设置 > Editor > File and Code Templates > Includes选项卡 > PHP File Header
/**
*
*
* @category xxx
* @package PSR
* @subpackage Documentation\API
* @author xxx <xxx@xxx.com>
* @license GPL https://xxx.com
* @link https://xxx.com
* @ctime: ${DATE} ${TIME}
*/
2. 函数头部设置
设置 > Editor > File and Code Templates > Includes选项卡 > PHP Function Doc Comment
/**
* ${NAME}
*
* @author xxx
*
${PARAM_DOC}
#if (${TYPE_HINT} == "void")
* @return void #else * @return ${TYPE_HINT} #end
*/
3. 设置注释符缩进位置
设置 > Editor > Code Style > PHP > Other选项卡
取消勾选Line comment at first column
勾选Add a space at comment start 可在 // 后自动添加一个空格
4. 将Tab制表符替换成4个空格
设置 > Editor > Code Style > PHP > Tabs and indents选项卡
取消勾选Use tab character