How to change the default author in PhpStorm for PHPDoc
If you are using PhpStorm 2017.1:
File > Settings > Editor > File and Code Templates > [Includes] > PHP File Header
Here you can edit the comment.
Preferences > Editor > File and Code Templates > Includes tab > PHP Class Doc Comment
/**
* Class ${NAME}
#if (${NAMESPACE}) * @package ${NAMESPACE}
#end
* @author Foo Bar <[email protected]>
*/
I edited @Mahmoud Zalt's answer, which is basically right, but the edit was rejected, so here you go. @Mahmoud Zalt's answer will only work if you have a namespace in the class, which is what the if/end logic is looking for.
Go to: preferences > Editor > File and Code Templates > [Includes] > PHP Class Doc Comment.
example:
/**
* Class ${NAME}
*
* @category
#if (${NAMESPACE}) * @package ${NAMESPACE}
#end
* @author John Doe <[email protected]>
*/
Create custom template variables and define their values right in the include template using the #set VTL directive. For example, if you want to your full name inserted in the file header instead of your login name defined through the ${USER}, write the following construct:
#set( $MyName = "John Smith" )
.Ref: https://www.jetbrains.com/help/phpstorm/2017.1/creating-and-editing-file-templates.html
My Solution:
Go to : Preferences > Editor > File and Code Templates > Includes tab > PHP Class Doc Comment
/**
#set( $USER = "Javier Solis Flores ( @JavierTwiteando )" )
* Created by ${PRODUCT_NAME}.
* User: ${USER}
* Date: ${DATE}
* Time: ${TIME}
*/