Question

I want to add a "PHP Class Doc Comment" to my php file. Everything works fine except that ${DATE} doesn't get replaced. I am clearly missing something so obvious! Can I not access this environment variable because it isn't available for this "built-in" template?

The following template

/**
 * Project-Name
 * Class ${NAME}
 * User: Brad Goss
 * Date: ${DATE}
 */

Results in:

/**
 * Project-Name
 * Class PBPermission
 * User: Brad Goss
 * Date: ${DATE}
 */
Was it helpful?

Solution

Go to SETTINGS -> IDE SETTINGS -> FILE AND CODE TEMPLATES -> PHP FILE HEADER and add the following:

@Date    ${DATE}

Now when you create a new file the file header comment block will contain the date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top