How to change the default author in PhpStorm for PHPDoc

configurationphpdocphpstorm

I search for a moment a way to change the name and mail used by PHPDoc in PhpStorm when you use the "autocomplete" by pressing Enter after typing /** just before a class or a function.

Example :

/**
 * Class DepartmentType
 *
 * @author Foo Bar <foo.bar@email.com>
 */
class Foo
{

Because, this name and this mail is not the name and mail configure for the git I use in my project. I don't find any place to change this defaults values…

Anyone have an idea ?

Best Solution

Preferences > Editor > File and Code Templates > Includes tab > PHP Class Doc Comment

/**
 * Class ${NAME}
#if (${NAMESPACE}) * @package ${NAMESPACE}
#end
 * @author Foo Bar <foo.bar@email.com>
 */

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.

Related Question