Can any IDE (eg PHPStorm, VS Code) correctly show functions added via require get_template_directory() string results?

In the process of looking this up I determined the correct answer is to use the full local path in my dev environment, and add a comment in the code like

/** @define "get_template_directory()" "/home/myuser/mywpproject/wp-content/themes/mytheme" */

And this works for the subsequent references in that file in JetBrains IDE / PHPStorm immediately. Thanks to here by Jeff Behnke. I have not checked this on other IDEs. As this is a comment I believe it should not affect server side execution.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)