To define the variable type for a PHP variable for sake of auto-completion in NetBeans IDE, simply type the shortcut
Tab. This will generate a comment that looks like this:
/* @var $variable Example */
After that line in the same variable scope, you will be able to see auto-complete for methods and properties of
Example class when you type:
This type-hinting is namespace friendly in PHP 5.3 and 5.4. I work mainly with PHP 5.3.