Define common global variables types as a project setting

I usually add PHPDoc comments to global variables to remove all the code inspection warnings and to get intellisense, but a client a work for is complaining about them and asked me to remove all these comments, as "unneeded".
So I have no choice: I must remove them.

I'm working in a WordPress related project, so there is a set of commonly used global variables. For instance I often use these:

 /** @var $wpdb WPDB */

 global $wpdb;

 /** var $pagenow string */

 global $pagenow;

/** @var $wp_query WP_Query */
 global $wp_query;

I wonder however if I there is in PhpStorm, in Project settings, or somewhere else, a place where I can define them "globally", so I can still get all the advantages of intellisense and no code inspection warnings.


Please sign in to leave a comment.